Esempio n. 1
0
 public PatrolState(StateManager.StateManager state, Enemy enemy, Max max)
 {
     this.enemy = enemy;
     this.state = state;
     this.max   = max;
     atitude    = auxAtitude = Atitude.patrol;
 }
Esempio n. 2
0
 public Level3State(StateManager.StateManager state, InputHandler inputHandler)
 {
     this.state        = state;
     actors            = new List <Actor.Actor>();
     openGate          = false;
     this.inputHandler = inputHandler;
 }
Esempio n. 3
0
        public Max(Texture2D texture, ContentManager content, InputHandler inputHandler) : base(texture)
        {
            position = new Vector2(370, 570);
            idle     = Max.IdleState.up;
            source   = new Rectangle(0, 164, 66, 82);
            state    = new StateManager.StateManager(content, inputHandler);

            state.setPrimaryState(new WalkingState(state, this));
        }
Esempio n. 4
0
        public Enemy(Texture2D texture, Vector2 position, ContentManager content, InputHandler inputHandler, Max max) : base(texture)
        {
            this.position = position;
            nextMove      = position;
            nextMoveX     = nextMoveY = 0;
            rg            = new Random();
            alive         = true;
            setActorState();
            setSource();
            state = new StateManager.StateManager(content, inputHandler);

            state.setPrimaryState(new PatrolState(state, this, max));
        }
Esempio n. 5
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            mouseState    = Mouse.GetState();
            keyboardState = Keyboard.GetState();
            inputHandler  = new InputHandler(mouseState, keyboardState);
            stateManager  = new StateManager.StateManager(Content, inputHandler);
            stateManager.setPrimaryState(new MainMenuState(stateManager));
            levelManager = new LevelManager();
            stateManager.setLevelManager(levelManager);
            // TODO: use this.Content to load your game content here
        }
Esempio n. 6
0
 public WalkingState(StateManager.StateManager state, Max max)
 {
     this.state = state;
     this.max   = max;
 }
Esempio n. 7
0
 public KickState(StateManager.StateManager state, Max max)
 {
     this.state = state;
     this.max   = max;
 }
Esempio n. 8
0
 public GrabState(Max max, StateManager.StateManager state)
 {
     this.max   = max;
     this.state = state;
 }
Esempio n. 9
0
 public Collision(IList <RectangleObjects> rectangles, IList <Actor.Actor> actors, StateManager.StateManager state)
 {
     this.actors     = actors;
     this.rectangles = rectangles;
     this.state      = state;
 }
Esempio n. 10
0
 public Pursue(IList <Actor.Actor> actors, StateManager.StateManager state)
 {
     this.actors = actors;
     rg          = new Random();
 }