public void SpawnParticles()
 {
     if (effect != 0)
     {
         ParticleSystem particleSystem = ParticleMaster.MakeSystem(effect);
         particleSystem.transform.parent        = this.transform;
         particleSystem.transform.localPosition = Vector3.zero;
         projParticleSystem = particleSystem;
     }
 }
示例#2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     if (instance != this)
     {
         DestroyImmediate(this);
     }
 }
示例#3
0
    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);
    }
示例#4
0
 // 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);
    }
示例#6
0
 void Start()
 {
     inst_particle = ParticleMaster.getInstance();
 }