예제 #1
0
 void Update()
 {
     if (_atEnd && Input.GetButtonDown("A"))
     {
         GameControllerScript.GetActiveGameController().ReleaseFocus();
         Destroy(gameObject.transform.parent.parent.gameObject);
     }
 }
예제 #2
0
    public override IEnumerator PlayEntranceAnimation(GameObject gameObject)
    {
        var player = gameObject.GetComponent <PlayerControllerScript>();

        GameControllerScript.GetActiveGameController().DemandFocus();

        yield return(new WaitForSeconds(Open()));

        yield return(new WaitForSeconds(player.MoveForward(2)));

        yield return(new WaitForSeconds(Close()));

        LoadScene();
    }
예제 #3
0
    public override IEnumerator PlayArrivalAnimation(GameObject gameObject)
    {
        GameControllerScript.GetActiveGameController().DemandFocus();
        var player = gameObject.GetComponent <PlayerControllerScript>();

        player.SetPosition((Vector2)transform.position - new Vector2(0.5f, 0.5f) + Vector2.up);
        player.SetDirection(PlayerControllerScript.Direction.Down);
        yield return(new WaitForSeconds(Open()));

        yield return(new WaitForSeconds(player.MoveForward(2)));

        yield return(new WaitForSeconds(Close()));

        GameControllerScript.GetActiveGameController().ReleaseFocus();
    }
예제 #4
0
 public void PlayText(string text)
 {
     GameControllerScript.GetActiveGameController().DemandFocus();
     StartCoroutine(RollingText(text));
 }