示例#1
0
 void OnTriggerEnter(Collider other)
 {
     foreach (string currentTag in tagsCanCollide)
     {
         if (other.tag.Equals(currentTag))
         {
             objectToShow.SetActive(true);
             Character2DController jogador = (Character2DController)FindObjectOfType(typeof(Character2DController));
             jogador.SetStateAnimation(EnumPlayerState.STAY);
             return;
         }
     }
 }
示例#2
0
 void Start()
 {
     player         = FindObjectOfType <Character2DController>();
     timeMinToShoot = Random.Range(timeMinToShoot, timeMaxToShoot);
 }