Exemplo n.º 1
0
        public AdventureScreen(Game game, int dest, int destroomX, int destroomY, int x, int y, bool beaten)
        {
            this.game = game;
            this.master = game.master;
            this.player = new AdventurePlayer(this, game);

            this.adventure = Master.currentFile.adventures[dest].Clone();
            this.tileset = adventure.tileset;
            this.key = adventure.key;
            this.beaten = beaten;
            label = adventure.name;
            LoadRoom(destroomX, destroomY);

            this.first_pos = new Vector2(x * 32 + 16, y * 32 + 16);
            player.location = new Vector2(x * 32 + 16, y * 32 + 16);
        }
Exemplo n.º 2
0
 public override bool inRange(AdventurePlayer player)
 {
     // Do nothing
     return false;
 }
Exemplo n.º 3
0
 public abstract void Activate(AdventurePlayer player, AdventureScreen screen, Game game);
Exemplo n.º 4
0
        public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game)
        {
            currentScreen = screen;

            if (count > 0 && !screen.lit)
            {
                screen.lit = true;
                count = count - 1;
                if (!screen.lit)
                    PlaySound.Play(PlaySound.SoundEffectName.Aspect);
            }
        }
Exemplo n.º 5
0
 public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game)
 {
     if ((cooldown == 0) && (player.z == 0))
     {
         Vector2 location = new Vector2(player.location.X, player.location.Y - 16);
         AdventureProjectile proj = new AdventureProjectile(true, player.faceDir, location, 30, 1);
         screen.addObject(proj);
         cooldown = 30;
         PlaySound.Play(PlaySound.SoundEffectName.Pew);
     }
 }
Exemplo n.º 6
0
        public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game)
        {
            if (lag < 1 && count > 0)
            {
                game.life = game.life + 10;
                if (game.life > game.possibleLife)
                    game.life = game.possibleLife;
                PlaySound.Play(PlaySound.SoundEffectName.Heal);
                count--;
                lag = 20;

                if (count == 0)
                    game.RemoveWeapon(this);
            }
        }
Exemplo n.º 7
0
 public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game)
 {
     //
 }
Exemplo n.º 8
0
        public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game)
        {
            if (lag < 1 && count > 0)
            {
                screen.player.Flash();
                count--;
                lag = 20;

                if (count == 0)
                    game.RemoveWeapon(this);
            }
        }
Exemplo n.º 9
0
 public override bool inRange(AdventurePlayer player)
 {
     return false;
 }
Exemplo n.º 10
0
 public abstract bool inRange(AdventurePlayer player);
Exemplo n.º 11
0
        public override bool inRange(AdventurePlayer player)
        {
            Vector2 playerloc = player.location;

            //if (Math.Sqrt( Math.Pow(location.X - playerloc.X, 2) + Math.Pow(location.Y - playerloc.Y, 2) ) <= Math.Max(width, height))
            if (doesOverlap(player))
            {
                player.Hurt();
                player.Recoil(location, this);
                return true;
            }
            return false;
        }
Exemplo n.º 12
0
 public override bool inRange(AdventurePlayer player)
 {
     Vector2 playerloc = player.location;
     //double del = Math.Sqrt(Math.Pow(location.X - playerloc.X, 2) + Math.Pow(location.Y - playerloc.Y, 2));
     //if (del <= Math.Max(width, height))
     if (doesOverlap(player))
     {
         jintEngine.Execute("inRange()");
         if (solid) player.Recoil(this.location, this);
         return solid;
     }
     else
         return false;
 }