예제 #1
0
 /// <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>();
 }
예제 #2
0
    void Awake()
    {
        if (shm == null)
        {
            shm = this;
        }
        else if (shm != this)
        {
            Destroy(gameObject);
        }

        player    = FindObjectOfType <Player>().transform;
        shotImage = FindObjectOfType <CurrentShotImage>();
        anim      = player.GetComponent <Animator>();
    }