Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         if (!isFollowing)
         {
             playerCont player = FindObjectOfType <playerCont>();
             followTarget        = player.keyFollowPoint;
             isFollowing         = true;
             player.followingKey = this;
         }
     }
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     player = FindObjectOfType <playerCont>();
     gameControllerScript = FindObjectOfType <GameController>();
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     UpdateScore();
     player = FindObjectOfType <playerCont>();
 }