Esempio n. 1
0
 public GameForm(Managers.InputManager inInputManager)
 {
     State = new Managers.StateManager(this);
     InitializeComponent();
     Inputs   = inInputManager;
     Renderer = new Managers.RenderManager(State, this.DisplayRectangle);
 }
Esempio n. 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Managers.InputManager inputManager = new Managers.InputManager();
            GameForm gf = new GameForm(inputManager);

            startup(inputManager, gf.State);
            Application.Run(gf);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }