public void SpawnParticles() { if (effect != 0) { ParticleSystem particleSystem = ParticleMaster.MakeSystem(effect); particleSystem.transform.parent = this.transform; particleSystem.transform.localPosition = Vector3.zero; projParticleSystem = particleSystem; } }
void Awake() { if (instance == null) { instance = this; } if (instance != this) { DestroyImmediate(this); } }
void KillMob() { Player.player.GiveGold((int)gold); if (deathParticles != 0) { ParticleSystem newSystem = ParticleMaster.MakeSystem((DeathParticles)deathParticles); newSystem.transform.position = this.transform.position; } if (spawner != null) { spawner.RemoveMob(this); } MobLister.RemoveMob(this); }
// Start is called before the first frame update void Start() { if (instance == null) { instance = this; deadParticleSystems = new List <ParticleSystem>(); particleSystems = new List <ParticleSystem>(); projectileFabs = projectileFabsLoad; deathFabs = deathFabsLoad; particleSystemFab = Resources.Load <GameObject>("Assets/Resources/Effects/Particles/ParticleSystemFab.prefab"); buildFab = buildFabLoad; if (particleSystemFab == null) { particleSystemFab = particleSystemFabLoad; } } }
private void HitTarget() { bool killedTarget = target.DamageMob(damage); if (Fork()) { } else if (Chain()) { } else if (AoE()) { } if (projExplosion != 0) { ParticleSystem newSystem = ParticleMaster.MakeSystem((ProjectileParticles)projExplosion); newSystem.transform.position = transform.position; } TowerBase.RemoveProjectile(this); }
void Start() { inst_particle = ParticleMaster.getInstance(); }