mirror of
https://github.com/ConjureETS/VZ.git
synced 2026-03-24 02:11:15 +00:00
- Updated CharacterBehavior
- Updated mapped dead animaition for vampire,squad,unit and zombie - Removed unused variable in tag and layer manager. - Updated sam_capture scene - Updated sam_squad scene
This commit is contained in:
parent
b678de5b82
commit
9de4c9ee7c
@ -13,37 +13,37 @@ AnimatorController:
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsAttacking
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsCaptured
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Dead
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: Fetched
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: IsEating
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@ -595,7 +595,7 @@ AnimatorStateMachine:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_Name: BaseLayer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 110207420}
|
||||
@ -633,6 +633,6 @@ AnimatorStateMachine:
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 48, y: 24, z: 0}
|
||||
m_EntryPosition: {x: 48, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 48, y: 276, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 110207420}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -87,6 +87,144 @@ NavMeshSettings:
|
||||
cellSize: .166666672
|
||||
manualCellSize: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &145102013
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 13
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 175210, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: VampireSquad (2)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &339478902
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (8)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &526208890
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 500
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 104082, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: ZombieSquad (1)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &614457924
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -146,7 +284,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 15
|
||||
--- !u!1001 &623359541
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -156,7 +294,7 @@ Prefab:
|
||||
m_Modifications:
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 15
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -164,7 +302,7 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 25
|
||||
value: 500
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@ -184,7 +322,7 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
@ -198,7 +336,7 @@ Prefab:
|
||||
m_Modifications:
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 7.81066799
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -206,7 +344,7 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 3.83980489
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@ -226,82 +364,12 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
value: 11
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &1387708718 stripped
|
||||
GameObject:
|
||||
m_PrefabParentObject: {fileID: 100080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
m_PrefabInternal: {fileID: 1562834474}
|
||||
--- !u!114 &1387708720
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1387708718}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8a1ccd1ad32d6bc4fb600c5b5720e01c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
defaultHp: 250
|
||||
defaultAttack: 100
|
||||
LerpSpeed: 1
|
||||
destinationGap: 5
|
||||
--- !u!114 &1387708721
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1387708718}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 74f0a139db076b941b792c3ed8936539, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!136 &1387708722
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1387708718}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 1.5
|
||||
m_Height: 5
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 2.54999995, z: 0}
|
||||
--- !u!54 &1387708723
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1387708718}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: Infinity
|
||||
m_AngularDrag: Infinity
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 84
|
||||
m_CollisionDetection: 0
|
||||
--- !u!135 &1387708725
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1387708718}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 5
|
||||
m_Center: {x: 0, y: 5, z: 0}
|
||||
--- !u!1001 &1535046822
|
||||
--- !u!1001 &788578737
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
@ -310,7 +378,7 @@ Prefab:
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 24.7399998
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
@ -318,7 +386,7 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 3.83980489
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@ -338,64 +406,336 @@ Prefab:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (1)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &1562834474
|
||||
--- !u!1001 &937322700
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 7.81066799
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 16.9099998
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 400080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (7)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &948426067
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (3)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &981726351
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (6)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &1300780447
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (2)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &1423736391
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 400
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (4)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &1606358940
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 500
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 404258, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9500000, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
propertyPath: m_Controller
|
||||
value:
|
||||
objectReference: {fileID: 9100000, guid: d02531a894e458e46a8e40c930cdc460, type: 2}
|
||||
- target: {fileID: 9500000, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
propertyPath: m_ApplyRootMotion
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 100080, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
- target: {fileID: 104082, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human2
|
||||
value: ZombieSquad (2)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 927610a088e26e54893541b8be6c050c, type: 3}
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 67442489137253e408a13ecfab4b5e3b, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1001 &1668489001
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 200
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 451766, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 12
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 175210, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: VampireSquad (1)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: eaa81b40663d4ca4e982795d1d9488e2, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &1904586272
|
||||
GameObject:
|
||||
@ -466,7 +806,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 16
|
||||
--- !u!1 &2021066802
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -551,4 +891,50 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 14
|
||||
--- !u!1001 &2112981299
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 400
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 447166, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 138032, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
propertyPath: m_Name
|
||||
value: Human (5)
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: 4cf1614d9b46f2848a2b47afe79f2f56, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
|
||||
@ -18,27 +18,24 @@ public class CharacterBehavior : MonoBehaviour
|
||||
|
||||
private CapsuleCollider _col;
|
||||
private Rigidbody _rb;
|
||||
// speed vector
|
||||
// LerpSpeed vector
|
||||
private Vector3 _velocity;
|
||||
// origin collider height
|
||||
private float _orgColHight;
|
||||
//
|
||||
private Vector3 _orgVectColCenter;
|
||||
|
||||
private Animator _animator;
|
||||
private AnimatorStateInfo _currentBaseState;
|
||||
private AnimatorStateInfo _currentAnimatorStateInfo;
|
||||
|
||||
private GameObject cameraObject;
|
||||
|
||||
//static int idleState = Animator.StringToHash("Base Layer.Idle");
|
||||
//static int movingState = Animator.StringToHash("Base Layer.IsMoving");
|
||||
//static int attackState = Animator.StringToHash("Base Layer.Smash");
|
||||
private GameObject _cameraObject;
|
||||
private static int _baseLayerIndex = 0;
|
||||
static int _idleState = Animator.StringToHash("Idle");
|
||||
static readonly int MovingState = Animator.StringToHash("IsMoving");
|
||||
static readonly int AttackState = Animator.StringToHash("IsAttacking");
|
||||
////static int restState = Animator.StringToHash("Base Layer.Rest");
|
||||
//private static int fetchState = Animator.StringToHash("Base Layer.IsEating");
|
||||
//private static int runNCaptureState = Animator.StringToHash("Base Layer.RunNCapture");
|
||||
//private static int idleCapture = Animator.StringToHash("Base Layer.IdleCapture");
|
||||
//private static int deadStage = Animator.StringToHash("Base Layer.Dead");
|
||||
//private static int fetchedState = Animator.StringToHash("Base Layer.Fetched");
|
||||
static readonly int FetchState = Animator.StringToHash("IsEating");
|
||||
static int _runNCaptureState = Animator.StringToHash("RunNCapture");
|
||||
static readonly int IdleCapture = Animator.StringToHash("IsCaptured");
|
||||
static readonly int DeadState = Animator.StringToHash("Dead");
|
||||
static readonly int FetchedState = Animator.StringToHash("Fetched");
|
||||
|
||||
void Start()
|
||||
{
|
||||
@ -46,48 +43,64 @@ public class CharacterBehavior : MonoBehaviour
|
||||
_animator = GetComponent<Animator>();
|
||||
_col = GetComponent<CapsuleCollider>();
|
||||
_rb = GetComponent<Rigidbody>();
|
||||
cameraObject = GameObject.FindWithTag("MainCamera");
|
||||
_orgColHight = _col.height;
|
||||
_orgVectColCenter = _col.center;
|
||||
_cameraObject = GameObject.FindWithTag("MainCamera");
|
||||
// return the state of the animation that is currently playing
|
||||
_currentAnimatorStateInfo = _animator.GetCurrentAnimatorStateInfo(_baseLayerIndex);
|
||||
}
|
||||
|
||||
public float CurrrentAnimationLength()
|
||||
{
|
||||
//_currentAnimatorStateInfo = _animator.GetCurrentAnimatorStateInfo(_baseLayerIndex);
|
||||
|
||||
// TODO Find a way to get the current animation length for each clip that is playing...
|
||||
Debug.Log(_currentAnimatorStateInfo.fullPathHash.Equals(DeadState)
|
||||
? "Vamp is dead"
|
||||
: _currentAnimatorStateInfo.fullPathHash.ToString());
|
||||
|
||||
return (_currentAnimatorStateInfo.normalizedTime % 1);
|
||||
}
|
||||
|
||||
public void PlayRunAnimation(bool decision)
|
||||
{
|
||||
_animator.SetBool("IsMoving", decision);
|
||||
_animator.SetBool(MovingState, decision);
|
||||
}
|
||||
|
||||
public void PlayAttackAnimation(bool decision)
|
||||
{
|
||||
_animator.SetBool("IsAttacking", decision);
|
||||
_animator.SetBool(AttackState, decision);
|
||||
}
|
||||
|
||||
public void PlayCaptureAnimation(bool decision)
|
||||
{
|
||||
_animator.SetBool("IsCaptured", decision);
|
||||
_animator.SetBool(IdleCapture, decision);
|
||||
}
|
||||
|
||||
public void PlayDeathAnimation()
|
||||
{
|
||||
_animator.SetTrigger("Dead");
|
||||
_animator.SetTrigger(DeadState);
|
||||
}
|
||||
|
||||
public void PlayFetchedAnimation()
|
||||
{
|
||||
_animator.SetTrigger("Fetched");
|
||||
_animator.SetTrigger(FetchedState);
|
||||
}
|
||||
|
||||
public void PlayEatingAnimation(bool decision)
|
||||
{
|
||||
_animator.SetBool("IsEating", decision);
|
||||
_animator.SetBool(FetchState, decision);
|
||||
}
|
||||
|
||||
public void PlayRunWhileCaptured(bool decision)
|
||||
{
|
||||
// TODO to test running while being captured
|
||||
PlayCaptureAnimation(decision);
|
||||
_animator.SetBool("IsMoving", decision);
|
||||
_animator.SetBool(MovingState, decision);
|
||||
}
|
||||
|
||||
public Animator GeAnimator()
|
||||
{
|
||||
return _animator;
|
||||
}
|
||||
void FixedUpdate()
|
||||
{
|
||||
//PlayRunAnimation(true);
|
||||
@ -102,6 +115,5 @@ public class CharacterBehavior : MonoBehaviour
|
||||
//PlayEatingAnimation(false);
|
||||
//PlayRunWhileCaptured(true);
|
||||
//PlayRunWhileCaptured(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ public class Squad : Unit
|
||||
/// <summary>
|
||||
/// List of abandonned units. (this list is accessible for both teams)
|
||||
/// </summary>
|
||||
private List<Unit> abandonnedUnits;
|
||||
private List<Unit> _abandonnedUnits;
|
||||
|
||||
/// <summary>
|
||||
/// Index of the first soldier in the list.
|
||||
@ -40,6 +40,7 @@ public class Squad : Unit
|
||||
{
|
||||
_humans = new List<Unit>();
|
||||
_soldiers = new List<Squad>();
|
||||
_abandonnedUnits = new List<Unit>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@ -48,11 +49,15 @@ public class Squad : Unit
|
||||
// TODO execute movement command
|
||||
// TODO Check if all the units are dead
|
||||
// if yes destroy
|
||||
if (_soldiers.Count != 0) return;
|
||||
// first release all humans ...
|
||||
AbandonUnits(_humans.Count);
|
||||
// then we destroy the squad
|
||||
DestroyUnit();
|
||||
if (_soldiers.Count == 0)
|
||||
{
|
||||
// first release all humans ...
|
||||
AbandonUnits(_humans.Count);
|
||||
// then we destroy the squad
|
||||
//DestroyUnit();
|
||||
IsDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region squad related functions
|
||||
@ -82,6 +87,7 @@ public class Squad : Unit
|
||||
/// <param name="soldierUnit">the soldier unit to add in the soldier unit list</param>
|
||||
void AddSoldier(Squad soldierUnit)
|
||||
{
|
||||
soldierUnit.IsCaptured = false;
|
||||
_soldiers.Add(soldierUnit);
|
||||
}
|
||||
|
||||
@ -91,7 +97,8 @@ public class Squad : Unit
|
||||
/// <param name="humanUnit">the human to add in the abandonned unit list</param>
|
||||
void AddAbandonnedHuman(Unit humanUnit)
|
||||
{
|
||||
abandonnedUnits.Add(humanUnit);
|
||||
humanUnit.IsCaptured = false;
|
||||
_abandonnedUnits.Add(humanUnit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -100,7 +107,7 @@ public class Squad : Unit
|
||||
/// <param name="humanUnit">the human unit to remove</param>
|
||||
void RemoveAbandonnedHuman(Unit humanUnit)
|
||||
{
|
||||
abandonnedUnits.Remove(humanUnit);
|
||||
_abandonnedUnits.Remove(humanUnit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -118,6 +125,7 @@ public class Squad : Unit
|
||||
soldier.Hp += soldier.Hp * ( 1 + percentageOfHpToHeal );
|
||||
}
|
||||
|
||||
humanUnit.GetComponent<CharacterBehavior>().PlayFetchedAnimation();
|
||||
// dispose of the human unit
|
||||
RemoveHuman(humanUnit);
|
||||
}
|
||||
@ -138,7 +146,6 @@ public class Squad : Unit
|
||||
humanUnit.Tag = TagLayerManager.Human;
|
||||
humanUnit.Layer = TagLayerManager.HumanLayerIndex;
|
||||
humanUnit.gameObject.GetComponent<Rigidbody>().useGravity = true;
|
||||
humanUnit.IsCaptured = false;
|
||||
|
||||
// add the human to the abandonned Unit list
|
||||
AddAbandonnedHuman(humanUnit);
|
||||
@ -188,7 +195,7 @@ public class Squad : Unit
|
||||
|
||||
// set the human tag to the same as the squad
|
||||
humanUnit.Tag = Tag;
|
||||
|
||||
|
||||
// AddSoldier((VampireSquad) humanUnit) ) (VampireSquad or ZombieSquad)
|
||||
if (Tag.Equals(TagLayerManager.VampirePlayer))
|
||||
{
|
||||
@ -221,15 +228,14 @@ public class Squad : Unit
|
||||
|
||||
protected void CaptureHuman(Unit unit)
|
||||
{
|
||||
// make the human a child of the squad game object
|
||||
//Debug.Log(String.Format("Human parent before colision :{0}", unit.transform.name));
|
||||
unit.IsCaptured = true;
|
||||
//unit.transform.parent = this.transform;
|
||||
// set the position of the squad as a target, so that
|
||||
// the unit would always follow the squad leader
|
||||
unit.TargetDestination = this.transform;
|
||||
//unit.transform.gameObject.GetComponent<Rigidbody>().useGravity = false;
|
||||
//unit.transform.localPosition = new Vector3(0, 0, 0);
|
||||
//Debug.Log(String.Format("Human parent before colision :{0}", unit.transform.parent.name));
|
||||
// specify that the unit is captured to that the captured animation plays at the next update.
|
||||
unit.IsCaptured = true;
|
||||
// add the caught human in the caught list.
|
||||
AddHuman(unit);
|
||||
|
||||
Debug.Log(string.Format("{0} joined the squad of : {1} ", unit.gameObject.name, transform.gameObject.name));
|
||||
}
|
||||
|
||||
@ -266,7 +272,7 @@ public class Squad : Unit
|
||||
/// <returns></returns>
|
||||
public List<Unit> GetAbandonnedUnits()
|
||||
{
|
||||
return abandonnedUnits;
|
||||
return _abandonnedUnits;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -7,7 +7,6 @@ public class TagLayerManager : MonoBehaviour
|
||||
{
|
||||
// Use this for initialization
|
||||
private static readonly string[] availableTags = UnityEditorInternal.InternalEditorUtility.tags;
|
||||
private static readonly string[] availableLayers = UnityEditorInternal.InternalEditorUtility.layers;
|
||||
// TODO FIND A WAY TO ADD EXCEPTION ERROR IF THE USER OMMIT TO ADD TAGS!!!
|
||||
public static string Human = availableTags[7];
|
||||
public static string VampirePlayer = availableTags[8];
|
||||
|
||||
@ -6,11 +6,14 @@ using JetBrains.Annotations;
|
||||
|
||||
public class Unit : MonoBehaviour
|
||||
{
|
||||
private LinkedList<Command> commandList;
|
||||
|
||||
public int defaultHp = 250;
|
||||
public int defaultAttack = 100;
|
||||
public float LerpSpeed = 1;
|
||||
public int destinationGap = 5;
|
||||
public float DyingTime = 1.0f;
|
||||
|
||||
private LinkedList<Command> commandList;
|
||||
private int _hp; // the unit hp
|
||||
private CharacterBehavior _character;
|
||||
// Use this for initialization
|
||||
@ -28,7 +31,11 @@ public class Unit : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (IsCaptured)
|
||||
if (IsDead)
|
||||
{
|
||||
DestroyUnit(DyingTime);
|
||||
}
|
||||
else if (IsCaptured)
|
||||
{
|
||||
var gapVector = new Vector3(TargetDestination.position.x + destinationGap, TargetDestination.position.y,TargetDestination.position.z + destinationGap);
|
||||
// TODO improve the translation position so that every unit captured are around the squad leader and not at only one position.
|
||||
@ -59,11 +66,16 @@ public class Unit : MonoBehaviour
|
||||
/// <summary>
|
||||
/// Destroy the current unit
|
||||
/// </summary>
|
||||
protected void DestroyUnit()
|
||||
protected IEnumerator DestroyUnit(float dyingTime)
|
||||
{
|
||||
//TODO First play dead animation
|
||||
// then destroy the game object
|
||||
Destroy(this.transform.gameObject);
|
||||
// retreive the character behavior object, so that we can access it's animation properties...
|
||||
var character = GetComponent<CharacterBehavior>();
|
||||
// play the death animation
|
||||
character.PlayDeathAnimation();
|
||||
yield return new WaitForSeconds(character.CurrrentAnimationLength());
|
||||
// then destroy the game object only 3 seconds after the animation
|
||||
Destroy(this.transform.gameObject, dyingTime);
|
||||
}
|
||||
|
||||
#region Unit properties
|
||||
@ -74,18 +86,12 @@ public class Unit : MonoBehaviour
|
||||
|
||||
set
|
||||
{
|
||||
if (Hp < 0)
|
||||
_hp = value > defaultHp ? defaultHp : value;
|
||||
|
||||
if (Hp <= 0)
|
||||
{
|
||||
_hp = 0;
|
||||
IsDead = true;
|
||||
}
|
||||
else if (value > defaultHp)
|
||||
{
|
||||
_hp = defaultHp;
|
||||
}
|
||||
else
|
||||
{
|
||||
_hp = value;
|
||||
//IsDead = true;
|
||||
StartCoroutine(DestroyUnit(DyingTime));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ public class VampireSquad : Squad
|
||||
if (IsDead)
|
||||
{
|
||||
// TODO play dead animation before destroying unit
|
||||
DestroyUnit();
|
||||
DestroyUnit(DyingTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ public class ZombieSquad : Squad
|
||||
if (IsDead)
|
||||
{
|
||||
// TODO play dead animation before destroying unit
|
||||
DestroyUnit();
|
||||
DestroyUnit(DyingTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user