Zombie implement 1
This commit is contained in:
parent
a72ced4f78
commit
793fa28563
Binary file not shown.
@ -9,11 +9,10 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5004747464968674621}
|
||||
- component: {fileID: 213116840797951420}
|
||||
- component: {fileID: 5873355939057640035}
|
||||
- component: {fileID: 1841366015044200858}
|
||||
- component: {fileID: 4593238991022112296}
|
||||
- component: {fileID: 5433357422100294214}
|
||||
- component: {fileID: 305547904}
|
||||
m_Layer: 0
|
||||
m_Name: Enemy
|
||||
m_TagString: Enemy
|
||||
@ -31,18 +30,11 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 9.257, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 7970332045596602580}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &213116840797951420
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545622996904709018}
|
||||
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &5873355939057640035
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -82,20 +74,6 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!136 &1841366015044200858
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545622996904709018}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!195 &4593238991022112296
|
||||
NavMeshAgent:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -132,4 +110,134 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
health: 100
|
||||
actualHealth: 0
|
||||
bodyParts: []
|
||||
bodyParts:
|
||||
- {fileID: 7695703802406861803}
|
||||
- {fileID: 5498343989639273671}
|
||||
- {fileID: 6397107207416332999}
|
||||
--- !u!136 &305547904
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3545622996904709018}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.52
|
||||
m_Height: 1.8
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &3163490712589900750
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 5004747464968674621}
|
||||
m_Modifications:
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -927199367670048503, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: zombie
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7977819192417808284, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_TagString
|
||||
value: Enemy
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b12b2387bea57e2418c82d9a45fa92d9, type: 3}
|
||||
--- !u!1 &6397107207416332999 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -927199367670048503, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3163490712589900750}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &7970332045596602580 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3163490712589900750}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &7695703802406861803 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4695666576454475813, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3163490712589900750}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &5498343989639273671 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7469484624682501897, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3163490712589900750}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
@ -121,12 +121,6 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 23800000, guid: 210c0a45ca7dddb429c704640ac83479, type: 2}
|
||||
--- !u!4 &305547909 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 5004747464968674621, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 3163490711718144037}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &597793628
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -463,108 +457,6 @@ Transform:
|
||||
m_Father: {fileID: 827899965}
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1411265515
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 305547909}
|
||||
m_Modifications:
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -4216859302048453862, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -927199367670048503, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: zombie
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b12b2387bea57e2418c82d9a45fa92d9, type: 3}
|
||||
--- !u!1 &1411265516 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -927199367670048503, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1411265515}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1411265517 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7469484624682501897, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1411265515}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1411265518 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4695666576454475813, guid: b12b2387bea57e2418c82d9a45fa92d9,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1411265515}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1753935063
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -812,28 +704,7 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5433357422100294214, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: bodyParts.Array.size
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5433357422100294214, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: bodyParts.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 1411265518}
|
||||
- target: {fileID: 5433357422100294214, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: bodyParts.Array.data[1]
|
||||
value:
|
||||
objectReference: {fileID: 1411265517}
|
||||
- target: {fileID: 5433357422100294214, guid: b4e392e2cdb417b4c8bdf8e683bceb9b,
|
||||
type: 3}
|
||||
propertyPath: bodyParts.Array.data[2]
|
||||
value:
|
||||
objectReference: {fileID: 1411265516}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 213116840797951420, guid: b4e392e2cdb417b4c8bdf8e683bceb9b, type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b4e392e2cdb417b4c8bdf8e683bceb9b, type: 3}
|
||||
--- !u!1001 &6179705720582673448
|
||||
PrefabInstance:
|
||||
|
@ -34,10 +34,6 @@ public class EnemyManager : MonoBehaviour
|
||||
}
|
||||
navMeshAgent.isStopped = true;
|
||||
navMeshAgent.enabled = false;
|
||||
gameObject.AddComponent<Rigidbody>();
|
||||
Rigidbody rigidBodyEnemy = gameObject.GetComponent<Rigidbody>() as Rigidbody;
|
||||
rigidBodyEnemy.velocity = -gameObject.transform.forward;
|
||||
rigidBodyEnemy.mass = 50;
|
||||
Destroy(this.gameObject, 3);
|
||||
}
|
||||
}
|
||||
@ -73,7 +69,12 @@ public class EnemyManager : MonoBehaviour
|
||||
bodyParts[i].AddComponent<Rigidbody>();
|
||||
Rigidbody rigidBodyEnemy = bodyParts[i].GetComponent<Rigidbody>() as Rigidbody;
|
||||
bodyParts[i].AddComponent<MeshCollider>();
|
||||
rigidBodyEnemy.mass = 10;
|
||||
MeshCollider meshCollider = bodyParts[i].GetComponent<MeshCollider>() as MeshCollider;
|
||||
meshCollider.convex = true;
|
||||
if (i == bodyParts.Count -1) {
|
||||
rigidBodyEnemy.velocity = -bodyParts[i].transform.forward;
|
||||
}
|
||||
rigidBodyEnemy.mass = 10 * bodyParts.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user