Example #1
0
 public PlayerModel(bool isCollidable = true)
 {
     IsCollidable = isCollidable;
     _inputManager = InputManager.GetInstance();
     LoadPrimitive();
     _prevMouseState = Mouse.GetState();
 }
Example #2
0
 public PlayerModel(bool isCollidable = true)
 {
     IsCollidable = isCollidable;
     _inputManager = InputManager.GetInstance();
     LoadPrimitive();
     _prevMouseState = Mouse.GetState();
     _gameBounds = Game1.GameInstance.GraphicsDevice.Viewport.Bounds;
 }
Example #3
0
        protected override void Initialize()
        {
            CollisionManager = CollisionManager.GetInstance(this);
            InputManager = InputManager.GetInstance(this);
            BasicManager = BasicManager.GetInstance(this);
            if (useBloom)
                bloom = new BloomComponent(this);

            Overlay = new Overlay(this);
            Camera = new Camera(this);
            StateManager = new StateManager(this);

            Components.Add(InputManager);
            //Components.Add(BasicManager);
            //Components.Add(CollisionManager);
            Components.Add(StateManager);
            //if (useBloom)
            //    Components.Add(bloom);
            //Components.Add(Overlay);
            //Components.Add(Camera);

            base.Initialize();
        }
Example #4
0
 public static InputManager GetInstance(Game game)
 {
     return im ?? (im = new InputManager(game));
 }