Esempio n. 1
0
 void FixedUpdate()
 {
     smr.material.SetFloat("_Level", level);
     level -= Time.fixedDeltaTime;
     if (level <= 0)
     {
         instance = null;
         ai.Kill();
     }
 }
Esempio n. 2
0
 public void Die()
 {
     if (instance != null)
     {
         instance.ai.Kill();
     }
     instance     = this;
     smr.material = mat;
     smr.material.SetFloat("_Level", 1);
     this.enabled = true;
 }