Ejemplo n.º 1
0
    public virtual void OnDeath()
    {
        anim.enabled = false;
        StopAllCoroutines();
        Vector3    particlePoint = transform.position + new Vector3(0, Random.Range(-3f, 1.5f), 0);
        GameObject particle      = Instantiate(deathParticle, particlePoint, Quaternion.identity);

        Destroy(particle, 3.5f);
        //StartCoroutine(DeathScale(particlePoint));
        _agent.enabled = false;
        myDissolve.StartLerp();
        spawnerManager.OnEnemyDie();
    }
Ejemplo n.º 2
0
 void ChangeMaterial()
 {
     _myDissolve.StartLerp();
     _baseDissolve.StartLerp();
     DestroyObject();
 }