Ejemplo n.º 1
0
 public void ShowMessage(GameController.PlayerNumber recipientPlayer, string message)
 {
     Text.enabled = true;
     Timer        = MESSAGE_TIMER;
     Text.text    = message;
     AlignUIForPlayer(recipientPlayer);
 }
Ejemplo n.º 2
0
    public void AlignUIForPlayer(GameController.PlayerNumber playerNumber)
    {
        if (GameController.ScreenRotation == GameController.ScreenRotate.STATIC)
        {
            playerNumber = GameController.PlayerNumber.TWO;
        }

        RectTransform rt;

        switch (playerNumber)
        {
        case GameController.PlayerNumber.ONE:
            rt = Text.GetComponent <RectTransform>();
            rt.localRotation = Quaternion.Euler(0, 0, 180);
            break;

        case GameController.PlayerNumber.TWO:
            rt = Text.GetComponent <RectTransform>();
            rt.localRotation = Quaternion.Euler(0, 0, 0);
            break;
        }
    }