示例#1
0
        // Au tour du joueur
        public override void myTurnToPlay()
        {
            base.myTurnToPlay();
            PremadeBoardSetupParameters board = GameObject.Find("Board").GetComponent <PremadeBoardSetupParameters>();
            CharacterBehavior           chara = board.mainOpposingCharacter;

            gManager.selectionEnCours = false;
            gManager.actionPoints     = board.opponentObjectives.Count;
            gManager.actionCardsButton.SetActive(false);
            gManager.turnStarted = true;
            if (board.opponentObjectives.Count > 0)
            {
                if (board.opponentObjectives[0].GetComponent <CharacterBehavior>() != null)
                {
                    StartCoroutine(pursueCharacter(chara, board.opponentObjectives, 2));
                }
                else
                {
                    StartCoroutine(playScriptedMoves(chara, board.opponentObjectives));
                }
            }
            else
            {
                Debug.LogError("ScriptedPlayerBehavior, myTurnToPlay: Aucun comportement prévu pour " + chara.name + " pour cette mission");
                gManager.startTurn        = false; // Prevents from displaying Draw action cards button
                gManager.selectionEnCours = true;  // Prevents automatic player change
                StartCoroutine(changePlayer());
            }
        }
示例#2
0
 void displayMissionInstructions()
 {
     try
     {
         PremadeBoardSetupParameters board = GameObject.Find("Board").GetComponent <PremadeBoardSetupParameters>();
         instruction.text = board.missionInstruction;
         switchText.text  = gManager.app.GetComponent <LanguageManager>().tutorialsTexts.GetField(gManager.app.gameToLaunch.tutorialName).GetField("MissionTitle").GetField(gManager.app.gameLanguage.ToString()).str;
     }
     catch (System.Exception)
     {
         Invoke("displayMissionInstructions", 0.1f);
     }
 }