/// <summary> /// Awakes this instance. /// Asigna la variable estatica y el jugador /// </summary> private void Awake() { if (shm == null) { shm = this; } else if (shm != this) { Destroy(gameObject); } player = FindObjectOfType <Player>().transform; shotImage = FindObjectOfType <CurrentShotImage>(); }
void Awake() { if (shm == null) { shm = this; } else if (shm != this) { Destroy(gameObject); } player = FindObjectOfType <Player>().transform; shotImage = FindObjectOfType <CurrentShotImage>(); anim = player.GetComponent <Animator>(); }