mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 14:00:17 +00:00
use separate prefab for rocket explosion
This commit is contained in:
parent
d32688155c
commit
26ed669de8
4 changed files with 42086 additions and 1 deletions
|
@ -77,9 +77,10 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: ec78359df717b4b468d7394c6be40dcc, type: 3}
|
m_Script: {fileID: 11500000, guid: ec78359df717b4b468d7394c6be40dcc, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
explosionPrefab: {fileID: 100010, guid: 2894e2899fe860745afbc810459e2cc2, type: 3}
|
explosionPrefab: {fileID: 100010, guid: 4f8c6e508a3f69243ab7b8813398b7ed, type: 3}
|
||||||
explosionDamageAmount: 1000
|
explosionDamageAmount: 1000
|
||||||
explosionDamageRadius: 5
|
explosionDamageRadius: 5
|
||||||
|
particleSystemMultiplier: 1
|
||||||
collisionLayerMask:
|
collisionLayerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Bits: 4294967295
|
||||||
|
|
42072
Assets/Prefabs/RocketExplosion.prefab
Normal file
42072
Assets/Prefabs/RocketExplosion.prefab
Normal file
File diff suppressed because it is too large
Load diff
7
Assets/Prefabs/RocketExplosion.prefab.meta
Normal file
7
Assets/Prefabs/RocketExplosion.prefab.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4f8c6e508a3f69243ab7b8813398b7ed
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -3,6 +3,7 @@ using SanAndreasUnity.Importing.Conversion;
|
||||||
using SanAndreasUnity.Net;
|
using SanAndreasUnity.Net;
|
||||||
using SanAndreasUnity.Utilities;
|
using SanAndreasUnity.Utilities;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityStandardAssets.Effects;
|
||||||
using Object = UnityEngine.Object;
|
using Object = UnityEngine.Object;
|
||||||
|
|
||||||
namespace SanAndreasUnity.Behaviours
|
namespace SanAndreasUnity.Behaviours
|
||||||
|
@ -12,6 +13,7 @@ namespace SanAndreasUnity.Behaviours
|
||||||
public GameObject explosionPrefab;
|
public GameObject explosionPrefab;
|
||||||
public float explosionDamageAmount = 1000;
|
public float explosionDamageAmount = 1000;
|
||||||
public float explosionDamageRadius = 5;
|
public float explosionDamageRadius = 5;
|
||||||
|
public float particleSystemMultiplier = 1;
|
||||||
public LayerMask collisionLayerMask;
|
public LayerMask collisionLayerMask;
|
||||||
public float speed = 10;
|
public float speed = 10;
|
||||||
public float lifeTime = 30;
|
public float lifeTime = 30;
|
||||||
|
@ -94,6 +96,9 @@ namespace SanAndreasUnity.Behaviours
|
||||||
contactPoint,
|
contactPoint,
|
||||||
this.transform.rotation);
|
this.transform.rotation);
|
||||||
|
|
||||||
|
var psm = explosionGo.GetComponentOrThrow<ParticleSystemMultiplier>();
|
||||||
|
psm.multiplier = this.particleSystemMultiplier;
|
||||||
|
|
||||||
if (NetStatus.IsServer)
|
if (NetStatus.IsServer)
|
||||||
NetManager.Spawn(explosionGo);
|
NetManager.Spawn(explosionGo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue