public static void Initialize(Game game)
        {
            stateMachine = new CubicleWarsStateMachine(
                new HumanPlayer(GameData.GlobalData.PlayerOneName),
                new HumanPlayer(GameData.GlobalData.PlayerTwoName));

            game.Components.Add (new CubicleWarsGameView(game, stateMachine));
        }
 // Use this for initialization
 void Start()
 {
     stateMachine = new CubicleWarsStateMachine(
         new HumanPlayer(new Unit[] {
             GameObject.Find("Telephone").GetComponent<CellPhone>()
         }),
         new HumanPlayer(new Unit[] {}));
 }
예제 #3
0
        public void BeforeEach()
        {
            playerOne = Substitute.For <Player>();
            playerOne.Name.Returns("PlayerOne");
            playerTwo = Substitute.For <Player>();
            playerTwo.Name.Returns("PlayerTwo");

            stateMachine = new CubicleWarsStateMachine(playerOne, playerTwo);
        }
예제 #4
0
    void Awake()
    {
        stateMachine = new CubicleWarsStateMachine(
            new HumanPlayer("Player1"),
            new HumanPlayer("Player2"));

           	 var view = gameObject.GetComponent<GameView>();
         view.Bind(stateMachine);
    }
        public void BeforeEach()
        {
            playerOne = Substitute.For<Player>();
            playerOne.Name.Returns("PlayerOne");
            playerTwo = Substitute.For<Player>();
            playerTwo.Name.Returns("PlayerTwo");

            stateMachine = new CubicleWarsStateMachine(playerOne, playerTwo);
        }