Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (vida <= 0 && !muerto)
     {
         muerto = true;
         GetComponentInParent <Animator>().SetBool("Death", muerto);
         GetComponentInParent <TankMovement>().enabled = false;
         GetComponentInParent <BoxCollider2D>().size   = new Vector2(0.80f, 0.12f);
         GameObject temp_ghost = Instantiate(ghost, gameObject.transform.position, gameObject.transform.rotation);
         gameObject.SetActive(false);
         spawn.Spawn();
         Destroy(gameObject, 0.5f);
     }
 }