Example #1
0
 //List<Lantern> lanterns;
 public GameplayScreen(Game game)
 {
     this.game = game;
     world = new World((Game1)(game), this);
     animation = new Animation();
     player = new Player(new PlayerState(new Vector2(400, 400), new Vector2()));
     entities = new List<Entity>();
     lantern = new Lantern(player.playerState.position, player, true);
 }
Example #2
0
        // Initialize the player
        public void Initialize(Vector2 position, Game game)
        {
            animations = new Animation[4];
            animations[0] = new Animation();
            animations[0].Initialize(game, position, 2, 1000, Color.White, 1f, true, this, "idle right");
            animations[1] = new Animation();
            animations[1].Initialize(game, position, 2, 1000, Color.White, 1f, true, this, "idle left");
            animations[2] = new Animation();
            animations[2].Initialize(game, position, 6, 100, Color.BlueViolet, 1f, true, this, "walking left");
            animations[3] = new Animation();
            animations[3].Initialize(game, position, 6, 100, Color.BlueViolet, 1f, true, this, "walking right");

            playerAction = PlayerAction.IdleRight;

            lastRect = getRect();

            idle = true;
            facingRight = true;
        }