Ejemplo n.º 1
0
        public Tombstone(Creature source)
        {
            currentLevel = Game1.GetInstance().currentLevel;
            int chance = currentLevel.random.Next(4);

            switch (chance)
            {
                case 0:
                    this.texture = AkumaContentManager.stoneTex;
                    break;
                case 1:
                    this.texture = AkumaContentManager.stoneTex2;
                    break;
                case 2:
                    this.texture = AkumaContentManager.stoneTex3;
                    break;
                case 3:
                    this.texture = AkumaContentManager.stoneTex4;
                    break;
                default:
                    this.texture = AkumaContentManager.stoneTex;
                    break;
            }

            if (source is Deer)
            {
                Deer deer = (Deer)source;
                location.X = deer.location.X;
                location.Y = currentLevel.levelHeight - texture.Height * scale - 2;
            }
        }
Ejemplo n.º 2
0
        public Tombstone(Unit source)
        {
            currentLevel = Game1.GetInstance().currentLevel;
            int chance = currentLevel.random.Next(4);

            switch (chance)
            {
                case 0:
                    this.texture = AkumaContentManager.stoneTex;
                    break;
                case 1:
                    this.texture = AkumaContentManager.stoneTex2;
                    break;
                case 2:
                    this.texture = AkumaContentManager.stoneTex3;
                    break;
                case 3:
                    this.texture = AkumaContentManager.stoneTex4;
                    break;
                default:
                    this.texture = AkumaContentManager.stoneTex;
                    break;
            }

            if (source is DefaultEnemy)
            {
                DefaultEnemy enemy = (DefaultEnemy)source;
                if (enemy.falling || enemy.jumping)
                {
                    location.X = enemy.location.X;
                    location.Y = enemy.stopJumpOn + enemy.texture.Height - texture.Height * scale;
                }
                else
                {
                    location.X = enemy.location.X;
                    location.Y = currentLevel.levelHeight - texture.Height * scale - 2;
                }
            }
        }
Ejemplo n.º 3
0
        public AkumaViewport(Level level)
        {
            game = Game1.GetInstance();

            switch (level.level)
            {
                case 1:
                    bg = new Background(Background.BGType.ForestTutorial);
                    break;

                case 2:
                    bg = new Background(Background.BGType.Forest);
                    break;

                case 3:
                    bg = new Background(Background.BGType.ForestArena);
                    break;
            }

            level.offset = new Vector2(0, 0);
            screenSize = new Vector2(800, 480);
        }
Ejemplo n.º 4
0
        public void LoadIngameContent()
        {
            player = new Demon(0, 291);
            controller = new Controller();

            currentLevel = new Level(player, 1);
            currentLevel.GenerateLevel(currentLevel.level);
        }