Ejemplo n.º 1
0
 void StimulusClick()
 {
     if ((newInput) && (timer <= 0))
     {
         currentSpriteIndex = (currentSpriteIndex + 1) % sprites.Length;
         imageScript.sprite = sprites[currentSpriteIndex];
         newInput           = false;
         gameController.AddPoints(1);
         timer = displayTime;
     }
 }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.transform.tag == "EnterRunway")
     {
         gameController.EnterRunway();
         playerState = PlayerState.OnRunway;
     }
     else if (other.transform.tag == "RunwayCheckpoint")
     {
         gameController.RunwayCheckpoint();
         playerState = PlayerState.TakingOff;
     }
     else if (other.transform.tag == "FlyingStart")
     {
         gameController.FlyingStart();
         playerState = PlayerState.Flying;
     }
     else if (other.transform.tag == "Coin")
     {
         Destroy(other.gameObject);
         gameController.AddPoints(1);
     }
 }