Example #1
0
    public override IEnumerator Execute(BattleContext battleContext)
    {
        yield return(null);

        Debug.Log("ResultPhase");
        next = new EndPhase();
    }
Example #2
0
    void Start()
    {
        this.validator            = new GamePhaseValidator();
        this.trialVoteHandler     = new TrialVoteHandler(this);
        this.judgementVoteHandler = new JudgementVoteHandler(this);
        if (!SunLight)
        {
            SunLight = GameObject.Find("Directional Light").GetComponent <Light>();
        }

        this.startPhase = new StartPhase();
        this.endPhase   = new EndPhase();
        this.gameUI     = this.GetComponent <GameUI>();

        if (!playerHandler)
        {
            playerHandler = this.GetComponent <PlayerHandler>();
        }

        if (Players == null || Players.Length == 0)
        {
            Players = GameObject.FindObjectsOfType <PlayerController>();
        }

        if (!Camera)
        {
            Camera = GameObject.FindObjectOfType <WaypointCamera>();
        }
    }
 private void GetReferences()
 {
     weaponSelectionPhase = GetComponent <WeaponSelectionPhase>();
     paradePhase          = GetComponent <ParadePhase>();
     joustPhase           = GetComponent <JoustPhase>();
     intermissionPhase    = GetComponent <IntermissionPhase>();
     endPhaseScript       = GetComponent <EndPhase>();
 }
Example #4
0
        protected void CanSkipPhase(IPlayer player, ActionType nextExpectedActionType)
        {
            var actions = Game.GetAvailableActionTypes(player);

            Assert.Contains(ActionType.EndPhase, actions);

            var action = new EndPhase();

            Role.Execute(action, player);

            actions = Game.GetAvailableActionTypes(player);
            Assert.Contains(nextExpectedActionType, actions);
        }
        public void CanSkipWharf()
        {
            var wharf = new Wharf();

            wharf.AddWorker(new Colonist());
            RoleOwner.Buildings.Add(wharf);
            RoleOwner.Goods.Add(new Coffee());
            Game.CargoShips[0].Load(new List <IGood> {
                new Corn()
            });
            Game.CargoShips[1].Load(new List <IGood> {
                new Sugar()
            });
            Game.CargoShips[2].Load(new List <IGood> {
                new Indigo()
            });

            ReselectRole();

            var action = new EndPhase();

            CanExecuteActionMultiple(action, RoleOwner);
            CanExecuteActionOnce(action, RoleOwner);
        }