Exemple #1
0
 public MovableTile(Level level, Vector2 position, TileCollision collision , Boolean SmashBlock)
 {
     this.level = level;
     this.position = position;
     this.collision = collision;
     this.isSmashBlock = SmashBlock;
     LoadContent();
 }
Exemple #2
0
        public TileEngine(Level level)
        {
            this.Level = level;

            // Create a new content manager to load content used just by this level.
            if (content == null)
                content = new ContentManager(Statics.Game.Services, "Content");

            // Load background layer textures. For now, all levels must
            // use the same backgrounds and only use the left-most part of them.
            layers = new Layer[3];
            if (!Level.Name.Equals("Boss"))
            {
                layers[0] = new Layer("Backgrounds/Layer0", 0.2f);
                layers[1] = new Layer("Backgrounds/Layer1", 0.5f);
                layers[2] = new Layer("Backgrounds/Layer2", 0.8f);
            }
            else
            {
                layers[0] = new Layer("Backgrounds/BossLayer", 0.2f);
                layers[1] = new Layer("Backgrounds/BossLayer", 0.5f);
                layers[2] = new Layer("Backgrounds/BossLayer", 0.8f);
            }
        }