Exemple #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);
 }
Exemple #2
0
 public Map(Game1 game, World world, Player player, int x, int y)
     : base(game)
 {
     this.game = game;
     this.world = world;
     this.player = player;
     colFileName = world.getCollisionMapFilename(x, y);
     bgFileName = world.getBackgroundFilename(x, y);
     this.DrawOrder = 0;
     game.Components.Add(this);
     loadMap();
 }
Exemple #3
0
 public Lantern(Vector2 pos, Player p, bool carried)
 {
     this.pos = pos;
     player = p;
     beingCarried = carried;
 }
Exemple #4
0
 protected EventMap(Game1 game, World world, Player player, int x, int y)
     : base(game, world, player, x, y)
 {
 }
Exemple #5
0
        public void Initialize(Game game, Vector2 position, int frameCount,
int frametime, Color color, float scale, bool looping, Player player, String fn)
        {
            content = game.Content;
            this.player = player;
            // Keep a local copy of the values passed in
            this.color = color;
            //this.FrameWidth = frameWidth;
            //this.FrameHeight = frameHeight;
            this.frameCount = frameCount;
            this.frameTime = frametime;
            this.scale = scale;
            fileName = fn;

            Looping = looping;
            Position = position;
            spriteStrip = content.Load<Texture2D>(fileName);

            // Set the time to zero
            elapsedTime = 0;
            currentFrame = 0;

            // Set the Animation to active by default
            Active = true;
        }
Exemple #6
0
 public FirstFeatherMap(Game1 game, World world, Player player, Vector2 playPos)
     : base(game, world, player, 4, 2)
 {
     playerPosition = playPos;
     inCabThing = false;
 }