Change bodypart count calculation and fix missing prefab
This commit is contained in:
parent
9a1fe75704
commit
07045e5aff
@ -27,7 +27,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1716831649928673929}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -4.46, y: 3.62, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1716831651141931473}
|
||||
@ -101,7 +101,8 @@ MonoBehaviour:
|
||||
- {fileID: 3847767376140256459, guid: 7194f42d640f6cc4b8ff71eff6a9b85b, type: 3}
|
||||
DebugExplode: 0
|
||||
ParticlesPerBodypart: 40
|
||||
BodypartCountMultiplier: 4
|
||||
BodypartMinCount: 6
|
||||
BodypartMaxCount: 8
|
||||
DebrisType: 2
|
||||
--- !u!1 &1716831651141931474
|
||||
GameObject:
|
||||
|
@ -160,7 +160,8 @@ MonoBehaviour:
|
||||
- {fileID: 3847767376140256459, guid: 18cee0d8962f9124cbe00dcb3e6a009b, type: 3}
|
||||
DebugExplode: 0
|
||||
ParticlesPerBodypart: 70
|
||||
BodypartCountMultiplier: 1
|
||||
BodypartMinCount: 2
|
||||
BodypartMaxCount: 4
|
||||
DebrisType: 0
|
||||
--- !u!114 &3362493323285318061
|
||||
MonoBehaviour:
|
||||
|
@ -159,7 +159,10 @@ MonoBehaviour:
|
||||
- {fileID: 960737912245282743, guid: 2fb0a649165a8b7429b09809cd8e25c7, type: 3}
|
||||
- {fileID: 3610142911819508080, guid: a1affae9e5ef819468fdc1f18f63ca7e, type: 3}
|
||||
DebugExplode: 0
|
||||
KillOnZeroHealth: 1
|
||||
ParticlesPerBodypart: 70
|
||||
BodypartMinCount: 2
|
||||
BodypartMaxCount: 4
|
||||
DebrisType: 0
|
||||
--- !u!114 &3362493323285318061
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -129,7 +129,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 11699643827672081}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 4.08, y: 6.61, z: -11.644531}
|
||||
m_LocalPosition: {x: 4.08, y: 6.61, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 11699643643052995}
|
||||
@ -231,6 +231,8 @@ MonoBehaviour:
|
||||
- {fileID: 90224928841595158, guid: 7639604b8e230d5458302c542e81934d, type: 3}
|
||||
DebugExplode: 0
|
||||
ParticlesPerBodypart: 70
|
||||
BodypartMinCount: 4
|
||||
BodypartMaxCount: 6
|
||||
DebrisType: 1
|
||||
--- !u!1 &11699643844798482
|
||||
GameObject:
|
||||
|
@ -324,7 +324,7 @@ GameObject:
|
||||
- component: {fileID: 188743843}
|
||||
- component: {fileID: 188743842}
|
||||
m_Layer: 0
|
||||
m_Name: BloodLauncher
|
||||
m_Name: DebrisLauncher
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -344,6 +344,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
StructuralParticlePrefab: {fileID: 6669388256411233053, guid: 0a46972e02ebee74a96fb9ddc3e2e1af,
|
||||
type: 3}
|
||||
WoodParticlePrefab: {fileID: 8205645559456068290, guid: e0f0195950e91434491053557460a074,
|
||||
type: 3}
|
||||
BloodParticlePrefab: {fileID: 5625006176899801348, guid: 3eace925ee10ebb4da4f6d8f8ce22f5a,
|
||||
type: 3}
|
||||
CensoredBloodParticlePrefab: {fileID: 1882677610906969932, guid: 079fe6df2fbccbe4198535d6e8793dca,
|
||||
@ -108464,6 +108466,75 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1a0e05447c8cf2a4fa9b9dc697884a66, type: 3}
|
||||
--- !u!1001 &1590589036
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1716831649928673929, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Destructible (Table)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -4.46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 3.62
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 11
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1716831649928674037, guid: b58ccc83664f46d41b7771ad86253364,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: b58ccc83664f46d41b7771ad86253364, type: 3}
|
||||
--- !u!1001 &1598773782
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -109736,11 +109807,6 @@ PrefabInstance:
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 6.61
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11699643827672082, guid: 254d8b252b63a6547810dd3729ddc91b,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -11.644531
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11699643827672082, guid: 254d8b252b63a6547810dd3729ddc91b,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
|
@ -7,7 +7,8 @@ namespace Saltosion.OneWeapon.Effects {
|
||||
public GameObject[] BodypartPrefabs;
|
||||
public bool DebugExplode = false;
|
||||
public int ParticlesPerBodypart = 70;
|
||||
public float BodypartCountMultiplier = 1;
|
||||
public float BodypartMinCount = 1;
|
||||
public float BodypartMaxCount = 1;
|
||||
public DebrisType DebrisType;
|
||||
|
||||
private CameraFX CameraFX;
|
||||
@ -35,7 +36,7 @@ namespace Saltosion.OneWeapon.Effects {
|
||||
}
|
||||
|
||||
public void Explode(bool destroyGameObject) {
|
||||
int Count = (int)(BodypartPrefabs.Length * Random.value * BodypartCountMultiplier + 1);
|
||||
int Count = (int)(BodypartMinCount + (BodypartMaxCount - BodypartMinCount) * Random.value);
|
||||
for (int i = 0; i < Count; i++) {
|
||||
GameObject Obj = BodypartPrefabs[i % BodypartPrefabs.Length];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user