Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BattleMuscle
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
BattleMuscle
Commits
11fd03c6
Commit
11fd03c6
authored
May 10, 2021
by
czy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug修复
parent
d98d53a5
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1127 additions
and
1216 deletions
+1127
-1216
BattleUI.cs
BattleMuscle/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
+2
-2
Idle.anim
...cle/Assets/Art_Assets/Animation/Animation/Fight/Idle.anim
+1
-1
Running3.controller
...Assets/Art_Assets/Animation/Animation/Running3.controller
+1
-1
Level 1.unity
BattleMuscle/Assets/Levels/Level 1.unity
+708
-191
AIMove.cs
BattleMuscle/Assets/My/Scripts/AI/AIMove.cs
+236
-860
Attack.cs
BattleMuscle/Assets/My/Scripts/Attack.cs
+3
-3
Attack.cs.meta
BattleMuscle/Assets/My/Scripts/Attack.cs.meta
+0
-0
AttackTrigger.cs
BattleMuscle/Assets/My/Scripts/Player/AttackTrigger.cs
+29
-20
PlayerMove.cs
BattleMuscle/Assets/My/Scripts/Player/PlayerMove.cs
+15
-9
Enemy_Vertigo.cs
BattleMuscle/Assets/My/Scripts/Prop/Enemy_Vertigo.cs
+71
-71
GiantRock.cs
BattleMuscle/Assets/My/Scripts/Prop/GiantRock.cs
+52
-52
Wall.cs
BattleMuscle/Assets/My/Scripts/Wall/Wall.cs
+3
-0
AndroidManifest.xml.DISABLED
...uscle/Assets/Plugins/Android/AndroidManifest.xml.DISABLED
+0
-0
AndroidManifest.xml.DISABLED.meta
.../Assets/Plugins/Android/AndroidManifest.xml.DISABLED.meta
+0
-0
LauncherManifest.xml.DISABLED
...scle/Assets/Plugins/Android/LauncherManifest.xml.DISABLED
+0
-0
LauncherManifest.xml.DISABLED.meta
...Assets/Plugins/Android/LauncherManifest.xml.DISABLED.meta
+0
-0
launcherTemplate.gradle.DISABLED
...e/Assets/Plugins/Android/launcherTemplate.gradle.DISABLED
+0
-0
launcherTemplate.gradle.DISABLED.meta
...ets/Plugins/Android/launcherTemplate.gradle.DISABLED.meta
+0
-0
mainTemplate.gradle.DISABLED
...uscle/Assets/Plugins/Android/mainTemplate.gradle.DISABLED
+0
-0
mainTemplate.gradle.DISABLED.meta
.../Assets/Plugins/Android/mainTemplate.gradle.DISABLED.meta
+0
-0
EditorBuildSettings.asset
BattleMuscle/ProjectSettings/EditorBuildSettings.asset
+2
-2
ProjectSettings.asset
BattleMuscle/ProjectSettings/ProjectSettings.asset
+4
-4
No files found.
BattleMuscle/Assets/#A2_Scripts/Battle/UI/BattleUI.cs
View file @
11fd03c6
...
...
@@ -408,14 +408,14 @@ public class BattleUI : MonoBehaviour
//摇杆图标出现
public
void
ShowJoystick
()
{
print
(
"显示摇杆"
);
//
print("显示摇杆");
m_joystickImage
.
color
=
Color
.
white
;
m_thumbImage
.
color
=
Color
.
white
;
}
//摇杆图标隐藏
public
void
HideJoystick
()
{
print
(
"隐藏摇杆"
);
//
print("隐藏摇杆");
m_joystickImage
.
color
=
Color
.
clear
;
m_thumbImage
.
color
=
Color
.
clear
;
}
...
...
BattleMuscle/Assets/Art_Assets/Animation/Animation/Fight/Idle.anim
View file @
11fd03c6
...
...
@@ -1028,7 +1028,7 @@ AnimationClip:
m_Level
:
0
m_CycleOffset
:
0
m_HasAdditiveReferencePose
:
0
m_LoopTime
:
0
m_LoopTime
:
1
m_LoopBlend
:
0
m_LoopBlendOrientation
:
0
m_LoopBlendPositionY
:
0
...
...
BattleMuscle/Assets/Art_Assets/Animation/Animation/Running3.controller
View file @
11fd03c6
...
...
@@ -428,7 +428,7 @@ AnimatorStateTransition:
m_Name
:
m_Conditions
:
-
m_ConditionMode
:
2
m_ConditionEvent
:
Pu
nc
h
m_ConditionEvent
:
Pu
s
h
m_EventTreshold
:
0
m_DstStateMachine
:
{
fileID
:
0
}
m_DstState
:
{
fileID
:
0
}
...
...
BattleMuscle/Assets/Levels/Level 1.unity
View file @
11fd03c6
...
...
@@ -241,6 +241,8 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
animator
:
{
fileID
:
999493060
}
OtherTag
:
Competitor
targetWall
:
{
fileID
:
866649273
}
---
!u!4
&30458481
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836596769451
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -546,6 +548,115 @@ Transform:
m_Father
:
{
fileID
:
2003787601
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&186710579
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
186710580
}
-
component
:
{
fileID
:
186710584
}
-
component
:
{
fileID
:
186710583
}
-
component
:
{
fileID
:
186710582
}
-
component
:
{
fileID
:
186710581
}
m_Layer
:
0
m_Name
:
AttackTrigger
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&186710580
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
186710579
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
1.8499999
,
z
:
0.8
}
m_LocalScale
:
{
x
:
1.8837
,
y
:
1.84
,
z
:
1.9631765
}
m_Children
:
[]
m_Father
:
{
fileID
:
616173308
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&186710581
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
186710579
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
a7429fdbb6a4df14b83adb2c158eb8e1
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
animator
:
{
fileID
:
1276349154
}
OtherTag
:
Player
targetWall
:
{
fileID
:
916250627
}
---
!u!65
&186710582
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
186710579
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!23
&186710583
MeshRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
186710579
}
m_Enabled
:
0
m_CastShadows
:
1
m_ReceiveShadows
:
1
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RayTracingMode
:
2
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10303
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
1
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!33
&186710584
MeshFilter
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
186710579
}
m_Mesh
:
{
fileID
:
10202
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
---
!u!4
&197882073
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837986927772
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -824,7 +935,8 @@ Transform:
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
15
,
y
:
0
,
z
:
40
}
m_LocalScale
:
{
x
:
10
,
y
:
1
,
z
:
30
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1527153766
}
m_Father
:
{
fileID
:
316360034
}
m_RootOrder
:
10
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -1077,7 +1189,8 @@ Transform:
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
120
}
m_LocalScale
:
{
x
:
10
,
y
:
1
,
z
:
30
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1885328698
}
m_Father
:
{
fileID
:
316360034
}
m_RootOrder
:
12
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -1123,12 +1236,6 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&438805081
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
4168084413597115749
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&458507189
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836134347757
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -1294,6 +1401,36 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
491938002
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&497489066
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
497489067
}
m_Layer
:
0
m_Name
:
Pos0
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&497489067
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
497489066
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.52
,
z
:
-0.504
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1758950347
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&499402504
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836796782067
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -1428,7 +1565,7 @@ PrefabInstance:
-
target
:
{
fileID
:
2384245972812640027
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
propertyPath
:
m_Name
value
:
dungeon-wall-stone
(2)
value
:
dungeon-wall-stone
3
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2396026485699160655
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
...
...
@@ -1470,6 +1607,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
616173308
}
-
component
:
{
fileID
:
616173309
}
-
component
:
{
fileID
:
616173310
}
m_Layer
:
0
m_Name
:
Competitor1
m_TagString
:
Competitor
...
...
@@ -1485,10 +1623,11 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
616173307
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.5
,
z
:
-2.8416367
}
m_LocalPosition
:
{
x
:
1.77
,
y
:
0.5
,
z
:
-5.23
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
741505326
}
-
{
fileID
:
1276349151
}
-
{
fileID
:
186710580
}
m_Father
:
{
fileID
:
1935587871
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -1510,6 +1649,24 @@ CharacterController:
m_SkinWidth
:
0.08
m_MinMoveDistance
:
0.001
m_Center
:
{
x
:
0
,
y
:
1.73
,
z
:
0
}
---
!u!114
&616173310
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
616173307
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
22604520b1ef064468a7f5f682fe242b
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
VSpeed
:
10
power
:
1
MoveSpeed
:
0
targetWall
:
{
fileID
:
916250627
}
pathPos0
:
{
fileID
:
1527153765
}
aiState
:
0
---
!u!4
&619757041
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837933209637
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -1694,12 +1851,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
ac0b09e7857660247b1477e93731de29
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!4
&741505326
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
7918866692235385214
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&751558661
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837233425351
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -1784,6 +1935,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
267d4e345a9b9c44fa9acb5159d7815f
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
target
:
{
fileID
:
27030762
}
ps
:
{
fileID
:
19844352
,
guid
:
632339e29e2ddd64aab6f9dd68facc82
,
type
:
3
}
---
!u!54
&866649277
Rigidbody
:
...
...
@@ -1820,6 +1972,148 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1001
&873361215
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
1342203611
}
m_Modifications
:
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.y
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-3102349492647565238
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Materials.Array.data[0]
value
:
objectReference
:
{
fileID
:
2100000
,
guid
:
830d65e8817c54cfdb8149fab0e2911d
,
type
:
2
}
-
target
:
{
fileID
:
-3102349492647565238
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Enabled
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Name
value
:
Running3 (1)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
---
!u!4
&873361216
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
873361215
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&873361217
stripped
GameObject
:
m_CorrespondingSourceObject
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
873361215
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!114
&873361218
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
873361217
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
ad0d5b425a2c7f1479396c0567dc9d29
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!95
&873361219
Animator
:
serializedVersion
:
3
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
873361217
}
m_Enabled
:
1
m_Avatar
:
{
fileID
:
9000000
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_Controller
:
{
fileID
:
9100000
,
guid
:
7bd77968b133a5d479ca24ac40e56c8f
,
type
:
2
}
m_CullingMode
:
1
m_UpdateMode
:
0
m_ApplyRootMotion
:
0
m_LinearVelocityBlending
:
0
m_WarningMessage
:
m_HasTransformHierarchy
:
1
m_AllowConstantClipSamplingOptimization
:
1
m_KeepAnimatorControllerStateOnDisable
:
0
---
!u!1
&883198004
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1858,6 +2152,7 @@ MonoBehaviour:
particleChange
:
{
fileID
:
0
}
power
:
1
MoveSpeed
:
0
targetWall
:
{
fileID
:
866649273
}
---
!u!4
&883198006
Transform
:
m_ObjectHideFlags
:
0
...
...
@@ -1949,6 +2244,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
267d4e345a9b9c44fa9acb5159d7815f
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
target
:
{
fileID
:
186710581
}
ps
:
{
fileID
:
19844352
,
guid
:
632339e29e2ddd64aab6f9dd68facc82
,
type
:
3
}
---
!u!54
&916250631
Rigidbody
:
...
...
@@ -2009,6 +2305,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
267d4e345a9b9c44fa9acb5159d7815f
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
target
:
{
fileID
:
1414299317
}
ps
:
{
fileID
:
19844352
,
guid
:
632339e29e2ddd64aab6f9dd68facc82
,
type
:
3
}
---
!u!54
&952561890
Rigidbody
:
...
...
@@ -2423,6 +2720,36 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1135896824
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1135896825
}
m_Layer
:
0
m_Name
:
Pos0
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&1135896825
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1135896824
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.52
,
z
:
-0.504
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
1810808136
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&1145261519
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837774969784
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -2894,6 +3221,148 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1001
&1276349150
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
616173308
}
m_Modifications
:
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.y
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
0.099999994
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-3102349492647565238
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Materials.Array.data[0]
value
:
objectReference
:
{
fileID
:
2100000
,
guid
:
828ab9668f62548c6af197d0b6097fdb
,
type
:
2
}
-
target
:
{
fileID
:
-3102349492647565238
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Enabled
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Name
value
:
Running3 (2)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
---
!u!4
&1276349151
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
-4216859302048453862
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
1276349150
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1276349152
stripped
GameObject
:
m_CorrespondingSourceObject
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
1276349150
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!114
&1276349153
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1276349152
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
ad0d5b425a2c7f1479396c0567dc9d29
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!95
&1276349154
Animator
:
serializedVersion
:
3
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1276349152
}
m_Enabled
:
1
m_Avatar
:
{
fileID
:
9000000
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
m_Controller
:
{
fileID
:
9100000
,
guid
:
7bd77968b133a5d479ca24ac40e56c8f
,
type
:
2
}
m_CullingMode
:
1
m_UpdateMode
:
0
m_ApplyRootMotion
:
0
m_LinearVelocityBlending
:
0
m_WarningMessage
:
m_HasTransformHierarchy
:
1
m_AllowConstantClipSamplingOptimization
:
1
m_KeepAnimatorControllerStateOnDisable
:
0
---
!u!4
&1298933748
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836292309162
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -2934,6 +3403,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1342203611
}
-
component
:
{
fileID
:
1342203612
}
-
component
:
{
fileID
:
1342203613
}
m_Layer
:
0
m_Name
:
Competitor2
m_TagString
:
Competitor
...
...
@@ -2949,10 +3419,11 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1342203610
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.5
,
z
:
-5.3377
}
m_LocalPosition
:
{
x
:
-3.62
,
y
:
0.5
,
z
:
-5.3377
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
-
{
fileID
:
438805081
}
-
{
fileID
:
873361216
}
-
{
fileID
:
1414299316
}
m_Father
:
{
fileID
:
1935587871
}
m_RootOrder
:
2
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -2974,6 +3445,24 @@ CharacterController:
m_SkinWidth
:
0.08
m_MinMoveDistance
:
0.001
m_Center
:
{
x
:
0
,
y
:
1.61
,
z
:
0
}
---
!u!114
&1342203613
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1342203610
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
22604520b1ef064468a7f5f682fe242b
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
VSpeed
:
9
power
:
1
MoveSpeed
:
0
targetWall
:
{
fileID
:
952561886
}
pathPos0
:
{
fileID
:
497489066
}
aiState
:
0
---
!u!1001
&1345058900
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -3087,30 +3576,139 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1391171141
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837030691336
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
---
!u!4
&1391171141
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837030691336
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1398857887
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836534633458
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1401718554
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837277639726
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1408922741
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837666277573
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1414299315
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1414299316
}
-
component
:
{
fileID
:
1414299320
}
-
component
:
{
fileID
:
1414299319
}
-
component
:
{
fileID
:
1414299318
}
-
component
:
{
fileID
:
1414299317
}
m_Layer
:
0
m_Name
:
AttackTrigger
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&1414299316
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1414299315
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
1.8499999
,
z
:
0.56
}
m_LocalScale
:
{
x
:
1.8837
,
y
:
1.84
,
z
:
1.9631765
}
m_Children
:
[]
m_Father
:
{
fileID
:
1342203611
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1414299317
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1398857887
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836534633458
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_GameObject
:
{
fileID
:
1414299315
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
a7429fdbb6a4df14b83adb2c158eb8e1
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
animator
:
{
fileID
:
873361219
}
OtherTag
:
Player
targetWall
:
{
fileID
:
952561886
}
---
!u!65
&1414299318
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1401718554
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837277639726
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_GameObject
:
{
fileID
:
1414299315
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!23
&1414299319
MeshRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1408922741
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837666277573
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_GameObject
:
{
fileID
:
1414299315
}
m_Enabled
:
0
m_CastShadows
:
1
m_ReceiveShadows
:
1
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RayTracingMode
:
2
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10303
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
1
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!33
&1414299320
MeshFilter
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1414299315
}
m_Mesh
:
{
fileID
:
10202
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
---
!u!4
&1419822788
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448836720210256
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -3277,6 +3875,36 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1527153765
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1527153766
}
m_Layer
:
0
m_Name
:
Pos0
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&1527153766
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1527153765
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0.52
,
z
:
-0.504
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
331233293
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&1530044639
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448835952885486
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -4011,7 +4639,8 @@ Transform:
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-15
,
y
:
0
,
z
:
40
}
m_LocalScale
:
{
x
:
10
,
y
:
1
,
z
:
30
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
497489067
}
m_Father
:
{
fileID
:
316360034
}
m_RootOrder
:
11
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -4128,7 +4757,8 @@ Transform:
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
40
}
m_LocalScale
:
{
x
:
10
,
y
:
1
,
z
:
30
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1135896825
}
m_Father
:
{
fileID
:
316360034
}
m_RootOrder
:
9
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
...
...
@@ -4255,6 +4885,36 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1885328697
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1885328698
}
m_Layer
:
0
m_Name
:
Pos0
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&1885328698
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1885328697
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
1.39
,
z
:
-0.504
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
354878097
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&1907649378
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
5957448837383480972
,
guid
:
15d49ef1e12d35a46b7c6fb953021b43
,
...
...
@@ -4439,7 +5099,7 @@ PrefabInstance:
-
target
:
{
fileID
:
2384245972812640027
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
propertyPath
:
m_Name
value
:
dungeon-wall-stone
(1)
value
:
dungeon-wall-stone
2
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2396026485699160655
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
...
...
@@ -4781,6 +5441,11 @@ PrefabInstance:
propertyPath
:
m_Materials.Array.data[0]
value
:
objectReference
:
{
fileID
:
2100000
,
guid
:
ed566743e5bb3406488e664507552271
,
type
:
2
}
-
target
:
{
fileID
:
-3102349492647565238
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Enabled
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
-927199367670048503
,
guid
:
c219f3651d3c9d94bbb025aba0f6cd5e
,
type
:
3
}
propertyPath
:
m_Name
...
...
@@ -4879,7 +5544,7 @@ PrefabInstance:
-
target
:
{
fileID
:
2384245972812640027
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
propertyPath
:
m_Name
value
:
dungeon-wall-stone
value
:
dungeon-wall-stone
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2396026485699160655
,
guid
:
c0584c7c6c5cb2f448487b9cb51f45fc
,
type
:
3
}
...
...
@@ -4974,80 +5639,6 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
2825985020354422452
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1001
&4168084413597115749
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
1342203611
}
m_Modifications
:
-
target
:
{
fileID
:
8076896068043576261
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_Controller
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068050779147
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
8076896068051001451
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
propertyPath
:
m_Name
value
:
The Character 12 (1)
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
3e11dc23aff179e40bb7b366653729e4
,
type
:
3
}
---
!u!1001
&6348171781088263581
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -5133,80 +5724,6 @@ Transform:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
6348171781088263581
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1001
&7918866692235385214
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
616173308
}
m_Modifications
:
-
target
:
{
fileID
:
2606339339636488726
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_Name
value
:
The Character 12 (2)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339636909686
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2606339339650086776
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
propertyPath
:
m_Materials.Array.data[0]
value
:
objectReference
:
{
fileID
:
2100000
,
guid
:
828ab9668f62548c6af197d0b6097fdb
,
type
:
2
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
8e18c8adc9c33ba48a96b4114726676b
,
type
:
3
}
---
!u!1001
&8011702164409445992
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
BattleMuscle/Assets/My/Scripts/AI/AIMove.cs
View file @
11fd03c6
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
DG.Tweening
;
using
DG.Tweening.Core
;
public
enum
AIStrategy
{
...
...
@@ -15,199 +12,95 @@ public class AIMove : MonoBehaviour
[
Header
(
"控制移动"
)]
[
Tooltip
(
"控制向前的速度。"
)]
public
float
VSpeed
=
20.0f
;
[
Tooltip
(
"控制左右移动的速度。"
)]
public
float
HSpeed
=
10.0f
;
public
int
SpeedLevel
=
1
;
public
float
AddSpeed
=
10.0f
;
[
Tooltip
(
"游戏结束每秒减少的速度"
)]
public
float
deceleration
=
15
;
[
Header
(
"地面检测"
)]
public
Transform
ray1Pos
;
public
Transform
ray2Pos
;
public
Transform
raySeeWayPos
;
[
Header
(
"AI策略"
)]
public
AIStrategy
aIStrategy
;
[
Header
(
"模型控制"
)]
public
Transform
ModelParent
;
public
GameObject
Model1
;
public
GameObject
Model2
;
public
GameObject
Model3
;
[
Header
(
"升级效果"
)]
public
GameObject
Bag1
;
public
GameObject
Bag2
;
public
GameObject
Bag3
;
public
GameObject
Bag4
;
public
GameObject
BagOnBack1
;
public
GameObject
BagOnBack2
;
public
GameObject
BagOnBack3
;
public
GameObject
BagOnBack4
;
public
Material
targetMat
;
public
Texture
texture0
;
//原始颜色
public
Texture
texture1
;
public
Texture
texture2
;
public
Texture
texture3
;
public
Texture
texture4
;
[
Header
(
"特效"
)]
public
ParticleSystem
particleChange
;
//变身特效
//炫富特效
public
ParticleSystem
RunParticle
;
public
ParticleSystem
BackParticle
;
public
ParticleSystem
CarParticle
;
private
RaycastHit
RHit
;
private
CharacterController
characterController
;
private
bool
m_bIsCanMove
=
true
;
//是否能开车
private
MeshCollider
[]
m_targetTrans
;
//所有目标
private
MeshCollider
m_curTargetTrans
;
//当前抓的目标
// private Rigidbody m_rigidBody;//自身刚体
private
Dictionary
<
MeshCollider
,
bool
>
m_dicBox
=
new
Dictionary
<
MeshCollider
,
bool
>();
private
bool
m_bControlStartMove
=
false
;
private
RectTransform
m_thumbRT
;
//摇杆
private
Dictionary
<
Rigidbody
,
bool
>
m_dicRigidDic
=
new
Dictionary
<
Rigidbody
,
bool
>();
private
bool
isGround1
=
true
;
private
bool
isGround2
=
true
;
private
bool
isAddSpeed
=
true
;
private
float
timer
=
0.0f
;
//控制移动的中间变量
private
float
xDelta
=
0.0f
;
private
float
yDelta
=
0
;
private
float
zDelta
=
0
;
private
float
SpeedY
=
0
;
//相当于重力
private
float
deltaX
=
0.0f
;
//左右移动的距离。
private
int
AvoidObstaclesState
=
0
;
//0==未开始 1==躲避中 2==正在经过障碍物两侧。
//private float minX = 0;
//private float maxX = 0;
private
float
maxZ
=
-
10000
;
private
float
timerT1
=
0.0f
;
private
float
avoidX
=
0.0f
;
private
int
AvoidDir
=
0
;
//-1 0 1 左 不躲避 右
//眩晕
private
float
timerVertigo
=
0.0f
;
//眩晕时间。
//动画
private
Animator
animator
;
public
float
power
=
1
;
//状态
[
HideInInspector
]
public
float
MoveSpeed
=
0.0f
;
private
bool
Grounded
=
false
;
//动画
private
Animator
animator
;
private
GameObject
targetObj
;
//最大速度等级
private
int
MaxSpeedLevel
=
15
;
private
int
RandomFoodNumberToPush
=
1
;
private
int
HaveFoodNumber
=
0
;
//墙
public
GameObject
targetWall
;
//path pos0
public
GameObject
pathPos0
;
public
enum
AIState
{
FindFood
=
0
,
//找食物
GoToPathPos0
=
1
,
//去pos0
Push
=
2
,
//推墙
TurnBackToPathPos0
=
3
//返回Pos0
}
public
AIState
aiState
;
// Start is called before the first frame update
void
Start
()
{
//从配置文件ConfigurationFile中获取数据
//VSpeed = ConfigurationFile.instance.VSpeed;
SpeedLevel
=
ConfigurationFile
.
instance
.
SpeedLevel
;
//AddSpeed = ConfigurationFile.instance.AddSpeed;
//HSpeed = ConfigurationFile.instance.HSpeed;
characterController
=
GetComponent
<
CharacterController
>();
BattleCtrl
.
instance
.
turnDir
+=
TurnDir
;
//m_rigidBody = GetComponent<Rigidbody>();
GameServices
.
inputService
.
joyStick
.
onTouchStart
.
AddListener
(
OnTouchStart
);
GameServices
.
inputService
.
joyStick
.
onTouchUp
.
AddListener
(
OnTouchUp
);
m_thumbRT
=
GameServices
.
inputService
.
joyStick
.
thumb
;
//获取animator组件
animator
=
GetComponentInChildren
<
Animator
>();
//ChangeModel();
RandomFoodNumberToPush
=
Random
.
Range
(
1
,
11
);
aiState
=
AIState
.
FindFood
;
}
private
void
OnTriggerEnter
(
Collider
other
)
{
if
(
other
.
tag
==
"Gold"
)
//print("OnTriggerEnter:"+other.name);
if
(
other
.
tag
==
"Food"
)
{
if
(
SpeedLevel
<
MaxSpeedLevel
)
//other.gameObject.GetComponentInChildren<Gold>().PlayParticle();//吃金币特效
//Vector2 screenPoint = Camera.main.WorldToScreenPoint(other.gameObject.transform.position);
//BattleUI.instance.GenerateAddMoneyUI(100, screenPoint);
//Destroy(other.gameObject);
//print("吃到食物。");
HaveFoodNumber
++;
if
(
RandomFoodNumberToPush
<=
HaveFoodNumber
&&
targetWall
!=
null
)
{
SpeedLevel
+=
1
;
ChangeModel
();
//推墙
//targetObj = targetWall;
aiState
=
AIState
.
GoToPathPos0
;
//到路径起点,准备去推墙
}
other
.
gameObject
.
GetComponentInChildren
<
Gold
>().
PlayParticle
();
//吃金币特效
power
+=
0.3f
;
Scale
(
power
,
power
,
power
);
Destroy
(
other
.
gameObject
);
}
else
if
(
other
.
tag
==
"Prickle"
)
{
//触发地刺
ChangeSpeedLevelToPrevMaxLevelAndChangeModel
();
}
}
private
void
OnCollisionExit
(
Collision
other
)
private
void
Scale
(
float
x
,
float
y
,
float
z
)
{
if
(
other
.
collider
.
gameObject
.
CompareTag
(
"Target"
))
{
MeshCollider
varBox
=
other
.
collider
.
gameObject
.
GetComponent
<
MeshCollider
>();
//if (m_dicBox.ContainsKey(varBox))
//{
// m_dicBox[varBox] = false;
//}
transform
.
localScale
=
new
Vector3
(
x
,
y
,
x
);
}
}
//invoke旋转
void
RotateInvoke
()
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
{
CancelRotateInvoke
();
InvokeRepeating
(
"RotateTarget"
,
0.5f
,
0.5f
);
}
//取消invoke
void
CancelRotateInvoke
()
if
(
hit
.
gameObject
==
targetWall
)
{
if
(
IsInvoking
(
"RotateTarget"
))
//print("碰到墙");
if
(
power
>
1
)
{
CancelInvoke
(
"RotateTarget"
);
hit
.
gameObject
.
GetComponent
<
Rigidbody
>().
AddForce
(
new
Vector3
(
0
,
0
,
100
));
power
-=
0.01f
;
}
}
void
OnTouchStart
()
{
//print("触碰开始。");
float
varX
=
(
Input
.
mousePosition
.
x
-
Screen
.
width
/
2f
)
/
(
Screen
.
width
/
GlobalConfig
.
NormalWidth
);
float
varY
=
(
Input
.
mousePosition
.
y
-
Screen
.
height
/
2f
)
/
(
Screen
.
width
/
GlobalConfig
.
NormalWidth
);
Vector2
varVec2
=
GameServices
.
inputService
.
joyStick
.
gameObject
.
transform
.
localPosition
;
varVec2
.
x
=
varX
;
varVec2
.
y
=
varY
;
GameServices
.
inputService
.
joyStick
.
gameObject
.
transform
.
localPosition
=
varVec2
;
//控制摇杆的位置。
Vector2
varThumb
=
m_thumbRT
.
sizeDelta
;
varThumb
.
x
=
80
;
varThumb
.
y
=
80
;
m_thumbRT
.
sizeDelta
=
varThumb
;
BattleCtrl
.
instance
.
battleUI
.
ShowJoystick
();
}
// 抬起回调
void
OnTouchUp
()
{
print
(
"触碰结束。"
);
if
(!
BattleCtrl
.
instance
.
isStartBattle
)
else
{
return
;
}
//m_bControlPlay = true;
BattleCtrl
.
instance
.
battleUI
.
SetSymbolPos
(
0
,
0
);
//----------摇杆操作
BattleCtrl
.
instance
.
battleUI
.
HideJoystick
();
Vector2
varThumb
=
m_thumbRT
.
sizeDelta
;
varThumb
.
x
=
4000
;
varThumb
.
y
=
4000
;
m_thumbRT
.
sizeDelta
=
varThumb
;
power
=
1
;
RandomFoodNumberToPush
=
Random
.
Range
(
1
,
11
);
HaveFoodNumber
=
0
;
//targetObj = GetTargetPos();
aiState
=
AIState
.
TurnBackToPathPos0
;
//到路径起点,准备去找食物
}
void
CancelDelayMoveHandle
()
{
if
(
IsInvoking
(
"DelayMoveHandle"
))
{
CancelInvoke
(
"DelayMoveHandle"
);
Scale
(
power
,
power
,
power
);
}
}
...
...
@@ -217,764 +110,247 @@ public class AIMove : MonoBehaviour
//print("游戏是否开始:"+ BattleCtrl.instance.isStartBattle);
//print("游戏是否结束:"+ BattleCtrl.instance.isEndBattle);
//从配置文件ConfigurationFile中获取数据
VSpeed
=
ConfigurationFile
.
instance
.
VSpeedAI
;
//SpeedLevel = ConfigurationFile.instance.SpeedLevelAI; //初始化一次。
AddSpeed
=
ConfigurationFile
.
instance
.
AddSpeedAI
;
HSpeed
=
ConfigurationFile
.
instance
.
HSpeedAI
;
deceleration
=
ConfigurationFile
.
instance
.
deceleration
;
if
(!
BattleCtrl
.
instance
.
isStartBattle
)
{
isAddSpeed
=
true
;
return
;
}
if
(
BattleCtrl
.
instance
.
isEndBattle
)
{
isAddSpeed
=
true
;
return
;
}
if
(
targetObj
==
null
)
{
targetObj
=
GetTargetPos
();
//print("获取新目标:"+ targetObj);
}
else
if
(
targetObj
.
transform
.
position
.
z
<
transform
.
position
.
z
)
{
targetObj
=
GetTargetPos
();
//print("获取新目标:" + targetObj);
}
//移动
MoveSpeed
=
VSpeed
+
AddSpeed
*
(
SpeedLevel
-
1
);
//是否在地面
Grounded
=
characterController
.
isGrounded
;
//print(""+ MoveSpeed+" "+ Grounded);
animator
.
SetFloat
(
"MoveSpeed"
,
MoveSpeed
);
animator
.
SetBool
(
"Grounded"
,
Grounded
);
if
(!
Grounded
)
{
SpeedY
+=
-
9.8f
*
5
*
Time
.
deltaTime
;
}
//AI策略,需要每一帧都执行放到FixedUpdate中。
switch
(
aIStrategy
)
{
case
AIStrategy
.
StraightLine
:
DoStraightLine
();
break
;
case
AIStrategy
.
PickUpPropsAndGold
:
DoPickUpPropsAndGold
();
break
;
case
AIStrategy
.
AvoidObstaclesAndPickUp
:
DoPickUpPropsAndGold
();
DoAvoidObstaclesAndPickUp
(
"Wall"
);
DoAvoidObstaclesAndPickUp
(
"Prickle"
);
break
;
default
:
DoStraightLine
();
break
;
}
//------------------------AI的寻路点切换---------------------------------------------------------------
//射线检测。
//Debug.DrawRay(transform.position, Vector3.down * 10f, Color.red);
RaycastHit
hit
;
//isGround = Physics.Raycast(transform.position, -Vector3.up, out hit,3.0f);// 可控制投射距离bool grounded = Physics.Raycast(transform.position, -Vector3.up, out hit,100.0);
isGround1
=
Physics
.
Raycast
(
ray1Pos
.
position
,
-
Vector3
.
up
,
out
hit
,
3.0f
);
if
(
hit
.
collider
!=
null
)
switch
(
aiState
)
{
RHit
=
hit
;
}
isGround2
=
Physics
.
Raycast
(
ray2Pos
.
position
,
-
Vector3
.
up
,
out
hit
,
3.0f
);
if
(
hit
.
collider
!=
null
&&
RHit
.
collider
!=
null
)
case
AIState
.
FindFood
:
//找食物
if
(
targetObj
==
null
||
targetObj
.
tag
!=
"Food"
)
{
RHit
=
hit
;
targetObj
=
GetTargetPos
();
//print("获取新目标:"+ targetObj);
}
if
(
RHit
.
collider
!=
null
)
break
;
case
AIState
.
GoToPathPos0
:
//去路径起点
targetObj
=
pathPos0
;
if
(
Vector3
.
Distance
(
transform
.
position
,
pathPos0
.
transform
.
position
)
<
0.2f
)
{
//print("正向:" + RHit.collider.gameObject.transform.forward.ToString())
;
aiState
=
AIState
.
Push
;
}
if
(
isGround1
||
isGround2
)
break
;
case
AIState
.
Push
:
//去推墙
if
(
targetWall
==
null
)
{
//在跑道上。
timer
=
0.0f
;
//按路径返回
targetObj
=
pathPos0
;
aiState
=
AIState
.
TurnBackToPathPos0
;
}
else
{
print
(
"跑出跑道。"
);
//m_rigidBody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationZ;
timer
+=
Time
.
deltaTime
;
//用来记时,1.5秒后如果player的y值小于-1.0f就判定游戏失败。
if
(
timer
>=
1.5f
&&
transform
.
position
.
y
<=
-
1.0f
)
//-9.49
{
//不在跑道上,并且y<-1.0f。游戏失败
BattleCtrl
.
instance
.
OnBattleFail
();
targetObj
=
targetWall
;
}
}
if
(
m_bIsCanMove
&&
!
BattleCtrl
.
instance
.
IsScoreSettlementStatus
)
{
if
(
timerVertigo
<=
0
)
{
timerVertigo
=
0.0f
;
//AI向前跑。
//characterController.SimpleMove(transform.forward * MoveSpeed);
characterController
.
Move
((
transform
.
forward
*
MoveSpeed
+
new
Vector3
(
0
,
SpeedY
,
0
))*
Time
.
deltaTime
+
new
Vector3
(
deltaX
,
0
,
0
));
//UpdateJoystick();
}
else
break
;
case
AIState
.
TurnBackToPathPos0
:
//返回路径起点
targetObj
=
pathPos0
;
if
(
Vector3
.
Distance
(
transform
.
position
,
pathPos0
.
transform
.
position
)
<
0.2f
)
{
//眩晕
timerVertigo
-=
Time
.
deltaTime
;
aiState
=
AIState
.
FindFood
;
}
break
;
default
:
Debug
.
LogError
(
aiState
);
break
;
}
else
{
//游戏已经结束但可以继续滑行
//print("游戏已经结束但可以继续滑行"); //Move((transform.forward * MoveSpeed + new Vector3(0, _vertSpeed, 0)) * Time.deltaTime + (new Vector3(xDelta, 0, 0)));
if
(
characterController
.
velocity
.
z
>=
0
)
{
characterController
.
SimpleMove
(
new
Vector3
(
0
,
0
,
characterController
.
velocity
.
z
-
deceleration
*
Time
.
deltaTime
));
}
//-------------------------------------------------------------------------------------
}
}
//print(aiState+""+targetObj);
yDelta
=
SpeedY
*
Time
.
deltaTime
;
Vector3
speed
=(
targetObj
.
transform
.
position
-
transform
.
position
).
normalized
*
VSpeed
;
xDelta
=
speed
.
x
*
Time
.
deltaTime
;
zDelta
=
speed
.
z
*
Time
.
deltaTime
;
Move
();
//AI策略,需要每一帧都执行放到FixedUpdate中。
public
void
DoStraightLine
()
{
deltaX
=
0
;
}
//AI策略,需要每一帧都执行放到FixedUpdate中。
public
void
DoPickUpPropsAndGold
()
{
if
(!
Grounded
)
{
}
else
{
//在地面上,计算导航去目标位置,每次移动的距离。
if
(
targetObj
!=
null
)
{
if
(
targetObj
.
transform
.
position
.
x
-
transform
.
position
.
x
>
0.3f
)
//误差值0.3
{
deltaX
=
HSpeed
*
Time
.
deltaTime
;
}
else
if
(
targetObj
.
transform
.
position
.
x
-
transform
.
position
.
x
<
-
0.3f
)
{
deltaX
=
-
HSpeed
*
Time
.
deltaTime
;
}
else
{
deltaX
=
0
;
}
}
}
}
//AI策略,需要每一帧都执行放到FixedUpdate中。
public
void
DoAvoidObstaclesAndPickUp
(
string
obstaclesTag
)
{
Debug
.
DrawRay
(
raySeeWayPos
.
position
,
raySeeWayPos
.
forward
*
10f
,
Color
.
red
);
RaycastHit
seeHit
;
bool
isSee
=
Physics
.
Raycast
(
raySeeWayPos
.
position
,
raySeeWayPos
.
forward
,
out
seeHit
,
6.0f
);
if
(
seeHit
.
collider
!=
null
)
{
//print("看见物体:" + seeHit.collider.tag);
if
(
seeHit
.
collider
.
tag
==
obstaclesTag
)
//if (seeHit.collider.tag == "Prickle")
{
//前方有障碍物
//deltaX = 0;//将寻金币的横向的位移变为0;
//seeHit.collider.bounds.size.x
//seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f
//minX = seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f - 0.5f;
//maxX = seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f + 0.5f;
maxZ
=
seeHit
.
transform
.
position
.
z
+
seeHit
.
collider
.
bounds
.
size
.
z
*
0.5f
+
0.5f
;
if
(
transform
.
position
.
x
<
seeHit
.
transform
.
position
.
x
)
{
//去左边
avoidX
=
seeHit
.
transform
.
position
.
x
-
seeHit
.
collider
.
bounds
.
size
.
x
*
0.5f
-
0.5f
;
AvoidDir
=
-
1
;
}
else
{
//去右边
avoidX
=
seeHit
.
transform
.
position
.
x
+
seeHit
.
collider
.
bounds
.
size
.
x
*
0.5f
+
0.5f
;
AvoidDir
=
1
;
}
}
}
if
(
transform
.
position
.
z
<
maxZ
)
{
//print("前方有障碍物,开始躲避AvoidDir:"+ AvoidDir+ "transform.position.x:"+ transform.position.x + "avoidX:" + avoidX);
//前方右障碍物,开始躲避。
//关闭金币导航
deltaX
=
0
;
//开始左右躲避
if
(
AvoidDir
==
-
1
&&
transform
.
position
.
x
>=
avoidX
)
{
//向左移动
//print("向左移动");
deltaX
=
-
HSpeed
*
Time
.
deltaTime
;
}
else
if
(
AvoidDir
==
-
1
&&
transform
.
position
.
x
<
avoidX
)
{
//向左躲避成功
AvoidDir
=
0
;
}
else
if
(
AvoidDir
==
1
&&
transform
.
position
.
x
<=
avoidX
)
public
void
Move
()
{
//向右走
deltaX
=
HSpeed
*
Time
.
deltaTime
;
//print("向右移动");
}
else
if
(
AvoidDir
==
1
&&
transform
.
position
.
x
>
avoidX
)
{
//躲避成功
AvoidDir
=
0
;
}
}
}
//摇杆控制
void
UpdateJoystick
()
{
print
(
"摇杆控制左右"
);
MoveType3
();
//比较生硬的形式
}
public
void
MoveType1
()
float
angle
=
Vector3
.
Angle
(
Vector3
.
forward
,
new
Vector3
(
xDelta
,
0
,
zDelta
));
if
(
xDelta
<
0
)
{
//1、rigibody的形式左右移动。
float
angle
=
90
*
0.01f
*
GameServices
.
inputService
.
joyStick
.
axisX
.
axisValue
;
if
(
angle
!=
0
)
{
//拖动摇杆改变速度方向
//m_rigidBody.velocity = Quaternion.Euler(0, angle, 0) * m_rigidBody.velocity;
}
else
{
//松开摇杆恢复速度方向。
if
(
isGround1
||
isGround2
)
{
//在地面上保持一定的速度。
//m_rigidBody.velocity = Vector3.Lerp(m_rigidBody.velocity, transform.forward * VSpeed, 5 * Time.deltaTime);
//m_rigidBody.velocity = transform.forward * VSpeed;
angle
=
-
Mathf
.
Abs
(
angle
);
}
transform
.
localEulerAngles
=
new
Vector3
(
0
,
angle
,
0
);
//print("AI开始移动:"+ new Vector3(xDelta, yDelta, zDelta));
characterController
.
Move
(
new
Vector3
(
xDelta
,
yDelta
,
zDelta
));
//移动
}
}
//移动
MoveSpeed
=
Vector3
.
Distance
(
Vector3
.
zero
,
characterController
.
velocity
);
//是否在地面
Grounded
=
characterController
.
isGrounded
;
animator
.
SetFloat
(
"MoveSpeed"
,
MoveSpeed
);
animator
.
SetBool
(
"Grounded"
,
Grounded
);
public
void
MoveType2
()
{
if
(
isGround1
||
isGround2
)
{
//在地面上保持一定的速度。
//m_rigidBody.velocity = transform.forward * VSpeed;
}
//2、改变 速度和transform的方向
TurnDir
(
90
*
0.01f
*
GameServices
.
inputService
.
joyStick
.
axisX
.
axisValue
);
}
public
void
MoveType3
()
{
characterController
.
SimpleMove
(
transform
.
forward
*
MoveSpeed
);
if
(
isGround1
||
isGround2
)
{
//在地面上才能控制移动
transform
.
position
+=
transform
.
right
*
GameServices
.
inputService
.
joyStick
.
axisX
.
axisValue
*
HSpeed
*
Time
.
deltaTime
;
}
}
/// <summary>
/// 调整速度方向为路面的正向。
/// </summary>
public
void
AutoSpeedDir
()
{
//调整速度方向为路面的正向。
if
(
RHit
.
collider
!=
null
&&
RHit
.
collider
.
gameObject
.
transform
.
forward
!=
transform
.
forward
)
{
TurnDir
(
Vector3
.
Angle
(
transform
.
forward
,
RHit
.
collider
.
gameObject
.
transform
.
forward
));
}
}
////AI策略,需要每一帧都执行放到FixedUpdate中。
//public void DoStraightLine()
//{
// deltaX = 0;
//}
////AI策略,需要每一帧都执行放到FixedUpdate中。
//public void DoPickUpPropsAndGold()
//{
// if (!Grounded)
// {
// }
// else
// {
// //在地面上,计算导航去目标位置,每次移动的距离。
// if (targetObj != null)
// {
// if (targetObj.transform.position.x - transform.position.x > 0.3f) //误差值0.3
// {
// deltaX = HSpeed * Time.deltaTime;
// }
// else if (targetObj.transform.position.x - transform.position.x < -0.3f)
// {
// deltaX = -HSpeed * Time.deltaTime;
// }
// else
// {
// deltaX = 0;
// }
// }
// }
//}
//AI策略,需要每一帧都执行放到FixedUpdate中。
//public void DoAvoidObstaclesAndPickUp(string obstaclesTag)
//{
// Debug.DrawRay(raySeeWayPos.position, raySeeWayPos.forward * 10f, Color.red);
// RaycastHit seeHit;
// bool isSee = Physics.Raycast(raySeeWayPos.position, raySeeWayPos.forward, out seeHit, 6.0f);
// if (seeHit.collider != null)
// {
// //print("看见物体:" + seeHit.collider.tag);
// if (seeHit.collider.tag == obstaclesTag)//if (seeHit.collider.tag == "Prickle")
// {
// //前方有障碍物
// //deltaX = 0;//将寻金币的横向的位移变为0;
// //seeHit.collider.bounds.size.x
// //seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f
// //minX = seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f - 0.5f;
// //maxX = seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f + 0.5f;
// maxZ = seeHit.transform.position.z + seeHit.collider.bounds.size.z * 0.5f + 0.5f;
// if (transform.position.x < seeHit.transform.position.x)
// {
// //去左边
// avoidX = seeHit.transform.position.x - seeHit.collider.bounds.size.x * 0.5f - 0.5f;
// AvoidDir = -1;
// }
// else
// {
// //去右边
// avoidX = seeHit.transform.position.x + seeHit.collider.bounds.size.x * 0.5f + 0.5f;
// AvoidDir = 1;
// }
// }
// }
// if (transform.position.z < maxZ)
// {
// //print("前方有障碍物,开始躲避AvoidDir:"+ AvoidDir+ "transform.position.x:"+ transform.position.x + "avoidX:" + avoidX);
// //前方右障碍物,开始躲避。
// //关闭金币导航
// deltaX = 0;
// //开始左右躲避
// if (AvoidDir == -1 && transform.position.x >= avoidX)
// {
// //向左移动
// //print("向左移动");
// deltaX = -HSpeed * Time.deltaTime;
// }
// else if (AvoidDir == -1 && transform.position.x < avoidX)
// {
// //向左躲避成功
// AvoidDir = 0;
// }
// else if (AvoidDir == 1 && transform.position.x <= avoidX)
// {
// //向右走
// deltaX = HSpeed * Time.deltaTime;
// //print("向右移动");
// }
// else if (AvoidDir == 1 && transform.position.x > avoidX)
// {
// //躲避成功
// AvoidDir = 0;
// }
// }
//}
//返回剩余物体个数
public
int
GetLeftBoxNum
()
{
int
varIndex
=
0
;
if
(
m_targetTrans
!=
null
)
{
for
(
int
i
=
0
;
i
<
m_targetTrans
.
Length
;
i
++)
{
if
(
m_targetTrans
[
i
].
transform
.
position
.
y
>=
2.0f
)
{
varIndex
++;
}
}
}
return
varIndex
;
}
void
Clicked
()
{
if
(
m_bIsCanMove
)
{
return
;
}
Ray
ray
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
RaycastHit
hit
=
new
RaycastHit
();
if
(
Physics
.
Raycast
(
ray
,
out
hit
))
{
if
(
hit
.
collider
&&
hit
.
collider
.
gameObject
.
CompareTag
(
"Target"
))
{
for
(
int
i
=
0
;
i
<
m_targetTrans
.
Length
;
i
++)
{
if
(
string
.
Equals
(
hit
.
collider
.
name
,
m_targetTrans
[
i
].
name
))
{
m_curTargetTrans
=
m_targetTrans
[
i
];
//重置状态
CancelDelayMoveHandle
();
CancelRotateInvoke
();
m_curTargetTrans
.
GetComponent
<
Rigidbody
>().
isKinematic
=
false
;
break
;
}
}
}
}
}
void
RotateTarget
()
{
if
(
m_bIsCanMove
)
{
return
;
}
if
(
m_curTargetTrans
)
{
m_curTargetTrans
.
transform
.
Rotate
(
transform
.
up
,
90.0f
);
}
}
//private void OnControllerColliderHit(ControllerColliderHit hit)
//{
// print("OnControllerColliderHit:" + hit.controller.name);
//}
public
void
Vertigo
(
float
time
)
{
//if (time > timerVertigo)
//{
// timerVertigo = time; //不累加时长,单会更新时长。
//}
timerVertigo
+=
time
;
//累加眩晕时长
}
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
//需要写到enemy中。
{
}
//获取目标点
public
GameObject
GetTargetPos
()
{
GameObject
[]
golds
=
GameObject
.
FindGameObjectsWithTag
(
"Gold"
);
//金币
GameObject
[]
props
=
GameObject
.
FindGameObjectsWithTag
(
"Prop"
);
//道具
//排序,z从小到大。
golds
=
DoRanking
.
_instance
.
DoRankingFun2
(
golds
);
props
=
DoRanking
.
_instance
.
DoRankingFun2
(
props
);
GameObject
goldObj
=
null
;
GameObject
propObj
=
null
;
foreach
(
var
prop
in
props
)
{
if
((
prop
.
transform
.
position
.
z
)>
transform
.
position
.
z
+
0.5f
)
{
propObj
=
prop
;
break
;
}
}
foreach
(
var
gold
in
golds
)
{
if
((
gold
.
transform
.
position
.
z
)
>
transform
.
position
.
z
+
0.5f
)
{
goldObj
=
gold
;
break
;
}
GameObject
[]
foods
=
GameObject
.
FindGameObjectsWithTag
(
"Food"
);
//食物
if
(
foods
.
Length
==
0
)
{
return
null
;
}
//排序,距离从小到大。
foods
=
DoRankingFun
(
foods
,
transform
.
position
);
return
foods
[
0
];
}
//print("propObj:" + propObj + "goldObj:" +goldObj);
//返回策略
if
(
propObj
!=
null
&&
goldObj
!=
null
)
{
if
((
propObj
.
transform
.
position
.
z
-
transform
.
position
.
z
)
>
(
goldObj
.
transform
.
position
.
z
-
transform
.
position
.
z
)+
5
)
{
//道具比金币还要远5距离就返回金币,否则返回道具。
return
goldObj
;
}
else
{
return
propObj
;
}
}
else
{
if
(
propObj
==
null
&&
goldObj
==
null
)
{
return
null
;
}
else
{
return
propObj
==
null
?
goldObj
:
propObj
;
}
}
}
public
void
TurnDir
(
float
angle
)
{
transform
.
localEulerAngles
+=
new
Vector3
(
0
,
angle
,
0
);
//m_rigidBody.velocity
//Vector3 newVec = Quaternion.AngleAxis(angle, axis) * oriVec;
//m_rigidBody.velocity = Quaternion.Euler(0, angle, 0) * m_rigidBody.velocity;
}
public
void
ChangeModel
()
//冒泡排序距离从小到大。
public
GameObject
[]
DoRankingFun
(
GameObject
[]
array
,
Vector3
pos
)
{
switch
(
SpeedLevel
)
GameObject
temp
=
null
;
for
(
int
i
=
0
;
i
<
array
.
Length
;
i
++)
{
case
1
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
true
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
false
);
//视觉效果变化
Bag1
.
SetActive
(
false
);
Bag2
.
SetActive
(
false
);
Bag3
.
SetActive
(
false
);
Bag4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
2
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
true
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
false
);
//视觉效果变化
Bag1
.
SetActive
(
true
);
Bag2
.
SetActive
(
false
);
Bag3
.
SetActive
(
false
);
Bag4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
emissionRate
=
2
;
RunParticle
.
gameObject
.
SetActive
(
true
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
3
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
true
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
false
);
//视觉效果变化
Bag1
.
SetActive
(
false
);
Bag2
.
SetActive
(
true
);
Bag3
.
SetActive
(
false
);
Bag4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
emissionRate
=
5
;
RunParticle
.
gameObject
.
SetActive
(
true
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
4
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
true
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
false
);
//视觉效果变化
Bag1
.
SetActive
(
false
);
Bag2
.
SetActive
(
false
);
Bag3
.
SetActive
(
true
);
Bag4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
emissionRate
=
10
;
RunParticle
.
gameObject
.
SetActive
(
true
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
5
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
true
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
false
);
//视觉效果变化
Bag1
.
SetActive
(
false
);
Bag2
.
SetActive
(
false
);
Bag3
.
SetActive
(
false
);
Bag4
.
SetActive
(
true
);
//粒子特效
RunParticle
.
emissionRate
=
15
;
RunParticle
.
gameObject
.
SetActive
(
true
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
//------------------------------------------------------------------------------------------
case
6
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
true
);
Model3
.
SetActive
(
false
);
//视觉效果变化
BagOnBack1
.
SetActive
(
false
);
BagOnBack2
.
SetActive
(
false
);
BagOnBack3
.
SetActive
(
false
);
BagOnBack4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
7
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
true
);
Model3
.
SetActive
(
false
);
//视觉效果变化
BagOnBack1
.
SetActive
(
true
);
BagOnBack2
.
SetActive
(
false
);
BagOnBack3
.
SetActive
(
false
);
BagOnBack4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
emissionRate
=
2
;
BackParticle
.
gameObject
.
SetActive
(
true
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
8
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
true
);
Model3
.
SetActive
(
false
);
//视觉效果变化
BagOnBack1
.
SetActive
(
true
);
BagOnBack2
.
SetActive
(
true
);
BagOnBack3
.
SetActive
(
false
);
BagOnBack4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
emissionRate
=
5
;
BackParticle
.
gameObject
.
SetActive
(
true
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
9
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
true
);
Model3
.
SetActive
(
false
);
//视觉效果变化
BagOnBack1
.
SetActive
(
true
);
BagOnBack2
.
SetActive
(
true
);
BagOnBack3
.
SetActive
(
true
);
BagOnBack4
.
SetActive
(
false
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
emissionRate
=
10
;
BackParticle
.
gameObject
.
SetActive
(
true
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
10
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
true
);
Model3
.
SetActive
(
false
);
//视觉效果变化
BagOnBack1
.
SetActive
(
true
);
BagOnBack2
.
SetActive
(
true
);
BagOnBack3
.
SetActive
(
true
);
BagOnBack4
.
SetActive
(
true
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
emissionRate
=
15
;
BackParticle
.
gameObject
.
SetActive
(
true
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
//-------------------------------------------------------------
case
11
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
true
);
//视觉效果变化
targetMat
.
SetTexture
(
"_MainTex"
,
texture0
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
12
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
true
);
//视觉效果变化
targetMat
.
SetTexture
(
"_MainTex"
,
texture1
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
13
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
true
);
//视觉效果变化
targetMat
.
SetTexture
(
"_MainTex"
,
texture2
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
14
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
true
);
//视觉效果变化
targetMat
.
SetTexture
(
"_MainTex"
,
texture3
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
false
);
break
;
case
15
:
//变身特效
PlayParticle
();
//模型变化
Model1
.
SetActive
(
false
);
Model2
.
SetActive
(
false
);
Model3
.
SetActive
(
true
);
//视觉效果变化
targetMat
.
SetTexture
(
"_MainTex"
,
texture4
);
//粒子特效
RunParticle
.
gameObject
.
SetActive
(
false
);
BackParticle
.
gameObject
.
SetActive
(
false
);
CarParticle
.
gameObject
.
SetActive
(
true
);
break
;
}
}
//速度等级变化为上一级最大的速度等级并改变模型。
public
void
ChangeSpeedLevelToPrevMaxLevelAndChangeModel
()
for
(
int
j
=
0
;
j
<
array
.
Length
-
i
-
1
;
j
++)
{
if
(
SpeedLevel
<=
1
)
if
(
System
.
Math
.
Round
(
Vector3
.
Distance
(
array
[
j
].
transform
.
position
,
pos
),
1
)
>
System
.
Math
.
Round
(
Vector3
.
Distance
(
array
[
j
+
1
].
transform
.
position
,
pos
),
1
))
//保留一位小数
{
SpeedLevel
=
1
;
return
;
temp
=
array
[
j
];
array
[
j
]
=
array
[
j
+
1
];
array
[
j
+
1
]
=
temp
;
}
switch
((
SpeedLevel
-
1
)
/
(
MaxSpeedLevel
/
3
))
{
case
0
:
SpeedLevel
=
1
;
break
;
case
1
:
SpeedLevel
=
MaxSpeedLevel
/
3
;
break
;
case
2
:
SpeedLevel
=
2
*
MaxSpeedLevel
/
3
;
break
;
default
:
Debug
.
LogError
(
"没有这个等级:"
+
SpeedLevel
);
break
;
}
ChangeModel
();
}
//改变速度等级
public
void
ChangeSpeedLevel
(
int
number
)
{
if
(
number
>
0
)
{
if
(
SpeedLevel
<
MaxSpeedLevel
)
{
SpeedLevel
+=
number
;
if
(
SpeedLevel
>
MaxSpeedLevel
)
SpeedLevel
=
MaxSpeedLevel
;
ChangeModel
();
}
}
else
{
if
(
SpeedLevel
>
1
)
{
SpeedLevel
+=
number
;
if
(
SpeedLevel
<=
0
)
SpeedLevel
=
1
;
ChangeModel
();
}
}
}
public
void
PlayParticle
()
{
ParticleSystem
copyParticle
=
Instantiate
(
particleChange
,
particleChange
.
transform
.
position
,
particleChange
.
transform
.
rotation
);
copyParticle
.
gameObject
.
AddComponent
<
DestroyMySel
>();
//4秒后销毁自身
copyParticle
.
Play
();
return
array
;
}
private
void
OnDestroy
()
{
m_targetTrans
=
null
;
m_curTargetTrans
=
null
;
CancelDelayMoveHandle
();
CancelRotateInvoke
();
BattleCtrl
.
instance
.
turnDir
-=
TurnDir
;
}
}
BattleMuscle/Assets/My/Scripts/
Player/Player
Attack.cs
→
BattleMuscle/Assets/My/Scripts/Attack.cs
View file @
11fd03c6
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Player
Attack
:
MonoBehaviour
public
class
Attack
:
MonoBehaviour
{
// Start is called before the first frame update
...
...
@@ -18,10 +18,10 @@ public class PlayerAttack : MonoBehaviour
}
public
void
AttackLeft
()
{
print
(
gameObject
.
name
+
":左手攻击"
);
//
print(gameObject.name+":左手攻击");
}
public
void
AttackRight
()
{
print
(
gameObject
.
name
+
":右手攻击"
);
//
print(gameObject.name + ":右手攻击");
}
}
BattleMuscle/Assets/My/Scripts/
Player/Player
Attack.cs.meta
→
BattleMuscle/Assets/My/Scripts/Attack.cs.meta
View file @
11fd03c6
File moved
BattleMuscle/Assets/My/Scripts/Player/AttackTrigger.cs
View file @
11fd03c6
...
...
@@ -4,9 +4,11 @@ using UnityEngine;
public
class
AttackTrigger
:
MonoBehaviour
{
private
bool
Punch
=
false
;
private
bool
Push
=
false
;
public
Animator
animator
;
public
string
OtherTag
=
"Competitor"
;
public
GameObject
targetWall
;
void
Start
()
{
}
...
...
@@ -18,36 +20,43 @@ public class AttackTrigger : MonoBehaviour
}
private
void
OnTriggerEnter
(
Collider
other
)
{
print
(
other
.
name
);
if
(
other
.
tag
==
"Competitor"
)
//print("进入。" +
other.name);
if
(
other
.
tag
==
OtherTag
)
//if (other.tag ==
"Competitor")
{
Punch
=
true
;
animator
.
SetBool
(
"Punch"
,
Punch
);
animator
.
SetLayerWeight
(
1
,
1
);
}
else
if
(
other
.
tag
==
"Wall"
)
ChangeAnimationPunchState
(
true
);
}
else
if
(
other
.
gameObject
==
targetWall
)
{
Push
=
true
;
animator
.
SetBool
(
"Push"
,
Push
);
animator
.
SetLayerWeight
(
1
,
1
);
ChangeAnimationPushState
(
true
);
}
}
private
void
OnTriggerExit
(
Collider
other
)
{
print
(
other
.
name
);
if
(
other
.
tag
==
"Competitor"
)
//print(other.name);
//print("退出。"+ other.name);
if
(
other
.
tag
==
OtherTag
)
{
Punch
=
false
;
animator
.
SetBool
(
"Punch"
,
Punch
);
animator
.
SetLayerWeight
(
1
,
0
);
}
else
if
(
other
.
tag
==
"Wall"
)
ChangeAnimationPunchState
(
false
);
}
else
if
(
other
.
gameObject
==
targetWall
)
{
Push
=
false
;
animator
.
SetBool
(
"Push"
,
Push
);
animator
.
SetLayerWeight
(
1
,
0
);
ChangeAnimationPushState
(
false
);
}
}
//Push
public
void
ChangeAnimationPushState
(
bool
isPush
)
{
animator
.
SetBool
(
"Push"
,
isPush
);
animator
.
SetLayerWeight
(
1
,
isPush
?
1
:
0
);
}
//punch
public
void
ChangeAnimationPunchState
(
bool
isPunch
)
{
animator
.
SetBool
(
"Punch"
,
isPunch
);
animator
.
SetLayerWeight
(
1
,
isPunch
?
1
:
0
);
}
}
BattleMuscle/Assets/My/Scripts/Player/PlayerMove.cs
View file @
11fd03c6
...
...
@@ -47,9 +47,6 @@ public class PlayerMove : MonoBehaviour
private
float
timer
=
0.0f
;
//输入控制player移动的中间变量
private
float
addXTemp
=
0
;
private
float
targetX
;
private
Vector3
movement
=
Vector3
.
zero
;
private
float
_vertSpeed
=
0.0f
;
private
float
xDelta
=
0.0f
;
private
float
yDelta
=
0
;
...
...
@@ -66,6 +63,8 @@ public class PlayerMove : MonoBehaviour
//最大速度等级
private
int
MaxSpeedLevel
=
15
;
//1-15 分为 1-5 6-10 11-15
public
GameObject
targetWall
;
...
...
@@ -109,7 +108,7 @@ public class PlayerMove : MonoBehaviour
//BattleUI.instance.GenerateAddMoneyUI(100, screenPoint);
//Destroy(other.gameObject);
print
(
"吃到食物。"
);
//
print("吃到食物。");
power
+=
0.3f
;
Scale
(
power
,
power
,
power
);
Destroy
(
other
.
gameObject
);
...
...
@@ -117,9 +116,9 @@ public class PlayerMove : MonoBehaviour
}
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
{
if
(
hit
.
gameObject
.
tag
==
"Wall"
)
if
(
hit
.
gameObject
==
targetWall
)
{
print
(
"碰到墙"
);
//
print("碰到墙");
if
(
power
>
1
)
{
hit
.
gameObject
.
GetComponent
<
Rigidbody
>().
AddForce
(
new
Vector3
(
0
,
0
,
100
));
...
...
@@ -305,6 +304,13 @@ public class PlayerMove : MonoBehaviour
}
//推墙
if
(
targetWall
==
null
)
{
//游戏失败
animator
.
SetBool
(
"Push"
,
false
);
}
}
...
...
BattleMuscle/Assets/My/Scripts/Prop/Enemy_Vertigo.cs
View file @
11fd03c6
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
//
using System.Collections;
//
using System.Collections.Generic;
//
using UnityEngine;
public
class
Enemy_Vertigo
:
MonoBehaviour
{
public
float
VSpeed
=
40.0f
;
public
int
SpeedLevel
=
1
;
public
float
AddSpeed
=
10.0f
;
public
float
VertigoTime
=
3.0f
;
//
public class Enemy_Vertigo : MonoBehaviour
//
{
//
public float VSpeed = 40.0f;
//
public int SpeedLevel = 1;
//
public float AddSpeed = 10.0f;
//
public float VertigoTime = 3.0f;
private
Transform
targetPos
;
//目标点
private
CharacterController
characterController
;
//动画
private
Animator
animator
;
//状态
private
float
MoveSpeed
=
0.0f
;
private
bool
Grounded
=
false
;
private
int
life
=
1
;
//
private Transform targetPos;//目标点
//
private CharacterController characterController;
//
//动画
//
private Animator animator;
//
//状态
//
private float MoveSpeed = 0.0f;
//
private bool Grounded = false;
//
private int life = 1;
void
Start
()
{
characterController
=
this
.
GetComponent
<
CharacterController
>();
targetPos
=
DoRanking
.
_instance
.
rankingList
[
2
].
transform
;
//获取animator组件
animator
=
GetComponentInChildren
<
Animator
>();
}
//
void Start()
//
{
//
characterController = this.GetComponent<CharacterController>();
//
targetPos = DoRanking._instance.rankingList[2].transform;
//
//获取animator组件
//
animator = GetComponentInChildren<Animator>();
//
}
// Update is called once per frame
void
Update
()
{
//读取配置文件数据
VSpeed
=
ConfigurationFile
.
instance
.
VSpeedEnemy_V
;
SpeedLevel
=
ConfigurationFile
.
instance
.
SpeedLevelEnemy_V
;
AddSpeed
=
ConfigurationFile
.
instance
.
AddSpeedEnemy_V
;
VertigoTime
=
ConfigurationFile
.
instance
.
VertigoTimeEnemy_V
;
//
// Update is called once per frame
//
void Update()
//
{
//
//读取配置文件数据
//
VSpeed = ConfigurationFile.instance.VSpeedEnemy_V;
//
SpeedLevel = ConfigurationFile.instance.SpeedLevelEnemy_V;
//
AddSpeed= ConfigurationFile.instance.AddSpeedEnemy_V;
//
VertigoTime = ConfigurationFile.instance.VertigoTimeEnemy_V;
//移动
MoveSpeed
=
VSpeed
+
AddSpeed
*
(
SpeedLevel
-
1
);
//是否在地面
Grounded
=
characterController
.
isGrounded
;
animator
.
SetFloat
(
"MoveSpeed"
,
MoveSpeed
);
animator
.
SetBool
(
"Grounded"
,
Grounded
);
//
//移动
//
MoveSpeed = VSpeed + AddSpeed * (SpeedLevel-1);
//
//是否在地面
//
Grounded = characterController.isGrounded;
//
animator.SetFloat("MoveSpeed", MoveSpeed);
//
animator.SetBool("Grounded", Grounded);
transform
.
LookAt
(
targetPos
);
Vector3
direction
=
(
targetPos
.
position
-
transform
.
position
);
direction
.
y
=
0
;
direction
=
direction
.
normalized
;
//characterController.SimpleMove(direction*Speed* SpeedLevel);
characterController
.
SimpleMove
(
direction
*
MoveSpeed
);
//
transform.LookAt(targetPos);
//
Vector3 direction = (targetPos.position - transform.position);
//
direction.y = 0;
//
direction = direction.normalized;
//
//characterController.SimpleMove(direction*Speed* SpeedLevel);
//
characterController.SimpleMove(direction * MoveSpeed);
}
//
}
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
{
if
(
life
<=
0
)
{
return
;
}
if
(
hit
.
collider
.
tag
==
"Competitor"
)
{
life
--;
hit
.
gameObject
.
GetComponent
<
AIMove
>().
Vertigo
(
VertigoTime
);
//眩晕1秒
//hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevel(-1); //等级降低一级
hit
.
gameObject
.
GetComponent
<
AIMove
>().
ChangeSpeedLevelToPrevMaxLevelAndChangeModel
();
//等级降低到上一级
Destroy
(
gameObject
);
}
if
(
hit
.
collider
.
tag
==
"Player"
)
{
life
--;
//hit.gameObject.GetComponent<PlayerMove>().Vertigo(VertigoTime);//眩晕1秒
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevel(-1); //等级降低一级
//print("减速前:"+ hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
// hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//print("减速后:" + hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
Destroy
(
gameObject
);
}
}
}
//
private void OnControllerColliderHit(ControllerColliderHit hit)
//
{
//
if (life <= 0)
//
{
//
return;
//
}
//
if (hit.collider.tag == "Competitor")
//
{
//
life--;
//
hit.gameObject.GetComponent<AIMove>().Vertigo(VertigoTime);//眩晕1秒
//
//hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevel(-1); //等级降低一级
//
hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//
Destroy(gameObject);
//
}
//
if (hit.collider.tag == "Player")
//
{
//
life--;
//
//hit.gameObject.GetComponent<PlayerMove>().Vertigo(VertigoTime);//眩晕1秒
//
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevel(-1); //等级降低一级
//
//print("减速前:"+ hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
//
// hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//
//print("减速后:" + hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
//
Destroy(gameObject);
//
}
//
}
//
}
BattleMuscle/Assets/My/Scripts/Prop/GiantRock.cs
View file @
11fd03c6
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
//
using System.Collections;
//
using System.Collections.Generic;
//
using UnityEngine;
public
class
GiantRock
:
MonoBehaviour
{
//
public class GiantRock : MonoBehaviour
//
{
public
Transform
ballModel
;
[
Tooltip
(
"眩晕时长"
)]
public
float
VertigoTime
=
3
;
private
Vector3
moveDirection
;
private
CharacterController
characterController
;
private
int
life
=
1
;
void
Start
()
{
characterController
=
GetComponent
<
CharacterController
>();
}
//
public Transform ballModel;
//
[Tooltip("眩晕时长")]
//
public float VertigoTime=3;
//
private Vector3 moveDirection;
//
private CharacterController characterController;
//
private int life = 1;
//
void Start()
//
{
//
characterController = GetComponent<CharacterController>();
//
}
// Update is called once per frame
void
Update
()
{
//配置文件读取数据
VertigoTime
=
ConfigurationFile
.
instance
.
VertigoTimeGianRock
;
//
// Update is called once per frame
//
void Update()
//
{
//
//配置文件读取数据
//
VertigoTime = ConfigurationFile.instance.VertigoTimeGianRock;
//moveDirection = transform.TransformDirection(-Vector3.forward) * 10f * Time.deltaTime;
moveDirection
.
z
=
-
10
*
Time
.
deltaTime
;
moveDirection
.
y
-=
9.81f
*
Time
.
deltaTime
;
characterController
.
Move
(
moveDirection
);
ballModel
.
Rotate
(-
Vector3
.
right
*
400
*
Time
.
deltaTime
);
//
//moveDirection = transform.TransformDirection(-Vector3.forward) * 10f * Time.deltaTime;
//
moveDirection.z = -10 * Time.deltaTime;
//
moveDirection.y -= 9.81f * Time.deltaTime;
//
characterController.Move(moveDirection);
//
ballModel.Rotate(-Vector3.right * 400 * Time.deltaTime);
}
private
void
OnControllerColliderHit
(
ControllerColliderHit
hit
)
{
if
(
life
<=
0
)
{
return
;
}
//
}
//
private void OnControllerColliderHit(ControllerColliderHit hit)
//
{
//
if (life <= 0)
//
{
//
return;
//
}
if
(
hit
.
collider
.
tag
==
"Competitor"
)
{
life
--;
hit
.
gameObject
.
GetComponent
<
AIMove
>().
Vertigo
(
VertigoTime
);
//眩晕1秒
//hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevel(-1); //等级降低一级
hit
.
gameObject
.
GetComponent
<
AIMove
>().
ChangeSpeedLevelToPrevMaxLevelAndChangeModel
();
//等级降低到上一级
Destroy
(
gameObject
);
}
if
(
hit
.
collider
.
tag
==
"Player"
)
{
life
--;
//hit.gameObject.GetComponent<PlayerMove>().Vertigo(VertigoTime);//眩晕1秒
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevel(-1); //等级降低一级
//print("减速前:"+ hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//print("减速后:" + hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
Destroy
(
gameObject
);
}
}
}
//
if (hit.collider.tag == "Competitor")
//
{
//
life--;
//
hit.gameObject.GetComponent<AIMove>().Vertigo(VertigoTime);//眩晕1秒
//
//hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevel(-1); //等级降低一级
//
hit.gameObject.GetComponent<AIMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//
Destroy(gameObject);
//
}
//
if (hit.collider.tag == "Player")
//
{
//
life--;
//
//hit.gameObject.GetComponent<PlayerMove>().Vertigo(VertigoTime);//眩晕1秒
//
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevel(-1); //等级降低一级
//
//print("减速前:"+ hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
//
//hit.gameObject.GetComponent<PlayerMove>().ChangeSpeedLevelToPrevMaxLevelAndChangeModel(); //等级降低到上一级
//
//print("减速后:" + hit.gameObject.GetComponent<PlayerMove>().SpeedLevel);
//
Destroy(gameObject);
//
}
//
}
//
}
BattleMuscle/Assets/My/Scripts/Wall/Wall.cs
View file @
11fd03c6
...
...
@@ -4,7 +4,9 @@ using UnityEngine;
public
class
Wall
:
MonoBehaviour
{
public
AttackTrigger
target
;
public
ParticleSystem
ps
;
void
Start
()
{
...
...
@@ -17,6 +19,7 @@ public class Wall : MonoBehaviour
particleSystem
.
gameObject
.
AddComponent
<
DestroyMySel
>();
particleSystem
.
transform
.
localScale
=
new
Vector3
(
2
,
2
,
2
);
particleSystem
.
Play
();
target
.
ChangeAnimationPushState
(
false
);
Destroy
(
gameObject
);
}
}
...
...
BattleMuscle/Assets/Plugins/Android/AndroidManifest.xml
→
BattleMuscle/Assets/Plugins/Android/AndroidManifest.xml
.DISABLED
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/AndroidManifest.xml.meta
→
BattleMuscle/Assets/Plugins/Android/AndroidManifest.xml.
DISABLED.
meta
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/LauncherManifest.xml
→
BattleMuscle/Assets/Plugins/Android/LauncherManifest.xml
.DISABLED
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/LauncherManifest.xml.meta
→
BattleMuscle/Assets/Plugins/Android/LauncherManifest.xml.
DISABLED.
meta
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/launcherTemplate.gradle
→
BattleMuscle/Assets/Plugins/Android/launcherTemplate.gradle
.DISABLED
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/launcherTemplate.gradle.meta
→
BattleMuscle/Assets/Plugins/Android/launcherTemplate.gradle.
DISABLED.
meta
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/mainTemplate.gradle
→
BattleMuscle/Assets/Plugins/Android/mainTemplate.gradle
.DISABLED
View file @
11fd03c6
File moved
BattleMuscle/Assets/Plugins/Android/mainTemplate.gradle.meta
→
BattleMuscle/Assets/Plugins/Android/mainTemplate.gradle.
DISABLED.
meta
View file @
11fd03c6
File moved
BattleMuscle/ProjectSettings/EditorBuildSettings.asset
View file @
11fd03c6
...
...
@@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion
:
2
m_Scenes
:
-
enabled
:
1
path
:
Assets/
#A1_Scenes/DemoScenes
.unity
guid
:
6e58ccd9deab5cc45ab8336af516167e
path
:
Assets/
Levels/Level 1
.unity
guid
:
2c8bee72f3bc18b47b6957a0f91a2fbc
m_configObjects
:
{}
BattleMuscle/ProjectSettings/ProjectSettings.asset
View file @
11fd03c6
...
...
@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources
:
0
accelerometerFrequency
:
60
companyName
:
Dyspace
productName
:
StockRunning
productName
:
BattleMuscle
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13725491
,
g
:
0.12156863
,
b
:
0.1254902
,
a
:
1
}
...
...
@@ -119,7 +119,7 @@ PlayerSettings:
16:10
:
1
16:9
:
1
Others
:
1
bundleVersion
:
1.
2
bundleVersion
:
1.
0
preloadedAssets
:
[]
metroInputSource
:
0
wsaTransparentSwapchain
:
0
...
...
@@ -250,7 +250,7 @@ PlayerSettings:
AndroidEnableTango
:
0
androidEnableBanner
:
1
androidUseLowAccuracyLocation
:
0
androidUseCustomKeystore
:
1
androidUseCustomKeystore
:
0
m_AndroidBanners
:
-
width
:
320
height
:
180
...
...
@@ -262,7 +262,7 @@ PlayerSettings:
-
m_BuildTarget
:
m_Icons
:
-
serializedVersion
:
2
m_Icon
:
{
fileID
:
2800000
,
guid
:
6b722ef34e612f3469255b9a116681ac
,
type
:
3
}
m_Icon
:
{
fileID
:
0
}
m_Width
:
128
m_Height
:
128
m_Kind
:
0
...
...
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