コード例 #1
0
ファイル: Program.cs プロジェクト: ThomThomson/AdvancedOop
        public static void startup(Managers.InputManager inputManager, Managers.StateManager stateManager)
        {
            List <GameObjects.IGameObject> StartingObjectList = new List <GameObjects.IGameObject>();

            //Create Gameobjects present at Game Start
            GameObjects.ObjectTypes.Landscape landscape = new GameObjects.ObjectTypes.Landscape(50, 100, 1, 3, 3, 4);
            StartingObjectList.Add(landscape);
            GameObjects.ObjectTypes.AStarChar character = new GameObjects.ObjectTypes.AStarChar(landscape, inputManager);
            StartingObjectList.Add(character);
            //End startup objects
            stateManager.setObjectList(StartingObjectList);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: ThomThomson/AdvancedOop
        public static void startup(int ballNum, Managers.InputManager inputManager, Managers.StateManager stateManager)
        {
            List <GameObjects.IGameObject> StartingObjectList = new List <GameObjects.IGameObject>();

            //Create Gameobjects present at Game Start
            GameObjects.ObjectTypes.Landscape landscape = new GameObjects.ObjectTypes.Landscape(50, 100, 10, 5, 3, 4);
            StartingObjectList.Add(landscape);
            GameObjects.ObjectTypes.KeyPlayer   player     = new GameObjects.ObjectTypes.KeyPlayer(inputManager, stateManager, landscape, 4);
            GameObjects.ObjectTypes.BallManager BallPlayer = new GameObjects.ObjectTypes.BallManager(inputManager, stateManager, landscape, ballNum, player);
            StartingObjectList.Add(player);
            StartingObjectList.Add(BallPlayer);
            //End startup objects

            stateManager.setObjectList(StartingObjectList, ballNum);
        }
コード例 #3
0
ファイル: KeyPlayer.cs プロジェクト: ThomThomson/AdvancedOop
 /// <summary>
 /// The KeyPlayer's constructor handles injection of necessary game elements.
 /// </summary>
 /// <param name="inInputManager">The input manager reference to determine the mouse position etc</param>
 /// <param name="inStateManager">The state manager for declaring victory conditions</param>
 /// <param name="inLandscape">The landscape reference </param>
 /// <param name="inHealth">The starting health for the KeyPlayer</param>
 public KeyPlayer(Managers.InputManager inInputManager, StateManager inStateManager, Landscape inLandscape, int inHealth)
 {
     health         = inHealth;
     startingHealth = inHealth;
     inputManager   = inInputManager;
     stateManager   = inStateManager;
     landscape      = inLandscape;
 }