Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StockRunning
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czy
StockRunning
Commits
9b3ef7b0
Commit
9b3ef7b0
authored
Apr 20, 2021
by
Ruidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.dy-space.com:czy/stockrunning
parents
999c5bee
54d89020
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10173 additions
and
10006 deletions
+10173
-10006
Level2My.prefab
StockRunning/Assets/My/Level2My.prefab
+10110
-3717
AIMove.cs
StockRunning/Assets/My/Scripts/AI/AIMove.cs
+5
-9
PlayerMove.cs
StockRunning/Assets/My/Scripts/Player/PlayerMove.cs
+5
-5
Prop.meta
StockRunning/Assets/My/Scripts/Prop.meta
+3
-2
Enemy_Vertigo.cs
StockRunning/Assets/My/Scripts/Prop/Enemy_Vertigo.cs
+2
-1
Enemy_Vertigo.cs.meta
StockRunning/Assets/My/Scripts/Prop/Enemy_Vertigo.cs.meta
+0
-0
Prop.cs
StockRunning/Assets/My/Scripts/Prop/Prop.cs
+37
-0
Prop.cs.meta
StockRunning/Assets/My/Scripts/Prop/Prop.cs.meta
+11
-0
Enemy_Vertigo.prefab
StockRunning/Assets/Resources/Enemy_Vertigo.prefab
+0
-6272
No files found.
StockRunning/Assets/My/Level2My.prefab
View file @
9b3ef7b0
This diff is collapsed.
Click to expand it.
StockRunning/Assets/My/Scripts/AI/AIMove.cs
View file @
9b3ef7b0
...
...
@@ -66,10 +66,6 @@ public class AIMove : MonoBehaviour
{
this
.
SpeedLevel
--;
}
}
else
if
(
other
.
tag
==
"Prop"
&&
DoRanking
.
_instance
.
rankingList
[
2
]
!=
gameObject
)
{
print
(
"出现怪。目标:"
+
DoRanking
.
_instance
.
rankingList
[
2
].
name
);
Destroy
(
other
.
gameObject
);
}
}
private
void
OnCollisionExit
(
Collision
other
)
...
...
@@ -363,12 +359,12 @@ public class AIMove : MonoBehaviour
//}
public
void
Vertigo
(
float
time
)
{
if
(
time
>
timerVertigo
)
{
timerVertigo
=
time
;
//不累加时长,单会更新时长。
}
//
if (time > timerVertigo)
//
{
//
timerVertigo = time; //不累加时长,单会更新时长。
//
}
//
timerVertigo += time; //累加眩晕时长
timerVertigo
+=
time
;
//累加眩晕时长
}
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
//需要写到enemy中。
...
...
StockRunning/Assets/My/Scripts/Player/PlayerMove.cs
View file @
9b3ef7b0
...
...
@@ -78,11 +78,11 @@ public class PlayerMove : MonoBehaviour
this
.
SpeedLevel
--;
}
}
else
if
(
other
.
tag
==
"Prop"
&&
DoRanking
.
_instance
.
rankingList
[
2
]!=
gameObject
)
//自己不是最前面的人。
{
print
(
"出现怪。目标:"
+
DoRanking
.
_instance
.
rankingList
[
2
].
name
);
Destroy
(
other
.
gameObject
);
}
//
else if (other.tag == "Prop" && DoRanking._instance.rankingList[2]!=gameObject) //自己不是最前面的人。
//
{
//
print("出现怪。目标:"+DoRanking._instance.rankingList[2].name);
//
Destroy(other.gameObject);
//
}
}
...
...
StockRunning/Assets/
Resources/Enemy_Vertigo.prefab
.meta
→
StockRunning/Assets/
My/Scripts/Prop
.meta
View file @
9b3ef7b0
fileFormatVersion: 2
guid: ed5d1b779680c74429ccd8efa73d6bca
PrefabImporter:
guid: f6eb4154a00d3a342a58544cb786d48c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
...
...
StockRunning/Assets/My/Scripts/
AI
/Enemy_Vertigo.cs
→
StockRunning/Assets/My/Scripts/
Prop
/Enemy_Vertigo.cs
View file @
9b3ef7b0
...
...
@@ -15,12 +15,13 @@ public class Enemy_Vertigo : MonoBehaviour
void
Start
()
{
characterController
=
this
.
GetComponent
<
CharacterController
>();
targetPos
=
DoRanking
.
_instance
.
rankingList
[
2
].
transform
;
}
// Update is called once per frame
void
Update
()
{
targetPos
=
DoRanking
.
_instance
.
rankingList
[
2
].
transform
;
Vector3
direction
=
(
targetPos
.
position
-
transform
.
position
);
direction
.
y
=
0
;
direction
=
direction
.
normalized
;
...
...
StockRunning/Assets/My/Scripts/
AI
/Enemy_Vertigo.cs.meta
→
StockRunning/Assets/My/Scripts/
Prop
/Enemy_Vertigo.cs.meta
View file @
9b3ef7b0
File moved
StockRunning/Assets/My/Scripts/Prop/Prop.cs
0 → 100644
View file @
9b3ef7b0
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Prop
:
MonoBehaviour
{
public
GameObject
enemy3AI
;
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
private
void
OnTriggerEnter
(
Collider
other
)
{
if
((
other
.
tag
==
"Competitor"
||
other
.
tag
==
"Player"
)
&&
DoRanking
.
_instance
.
rankingList
[
2
]
!=
other
.
gameObject
)
{
//print(DoRanking._instance.rankingList[2].name + "---" + other.gameObject.name+" "+ (DoRanking._instance.rankingList[2]== other.gameObject).ToString());
enemy3AI
.
transform
.
position
=
DoRanking
.
_instance
.
rankingList
[
2
].
transform
.
position
+
new
Vector3
(
0
,
0
,
100
);
enemy3AI
.
SetActive
(
true
);
Destroy
(
gameObject
);
}
//else if (other.tag == "Player" && DoRanking._instance.rankingList[2] != other.gameObject)
//{
// transform.position = other.gameObject.transform.position + new Vector3(0, 0, 100);
// enemy3AI.SetActive(true);
// Destroy(gameObject);
//}
}
}
StockRunning/Assets/My/Scripts/Prop/Prop.cs.meta
0 → 100644
View file @
9b3ef7b0
fileFormatVersion: 2
guid: 50a9bfefc266bf648be274dc28466693
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
StockRunning/Assets/Resources/Enemy_Vertigo.prefab
deleted
100644 → 0
View file @
999c5bee
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment