예제 #1
0
    public IEnumerator GetReady()
    {
        ShowGetReadySign();
        control.EnableMovement();
        yield return(new WaitForSeconds(2f));

        HideGetReadySign();
    }
예제 #2
0
    /// <summary>
    /// Shows the instructions for 4 seconds and toggles player controls
    /// </summary>
    public IEnumerator TrainSign()
    {
        control.DisableMovement();
        ShowTrainSign();
        yield return(new WaitForSeconds(4f));

        HideTrainSign();
        control.EnableMovement();
    }
예제 #3
0
 /// <summary>
 /// Get object references and start the instructions coroutine. Also disables the instructions in case the player dies
 /// </summary>
 void Start()
 {
     trainSign = GameObject.Find("trainSign").GetComponent <SpriteRenderer> ();
     control   = FindObjectOfType(typeof(BullTrainController)) as BullTrainController;
     if (firstTimeOnTheTrain)
     {
         StartCoroutine(TrainSign());
         StopCoroutine(TrainSign());
         firstTimeOnTheTrain = false;
     }
     else if (!firstTimeOnTheTrain)
     {
         StopAllCoroutines();
         HideTrainSign();
         control.EnableMovement();
     }
 }