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); }
public override bool inRange(AdventurePlayer player) { // Do nothing return false; }
public abstract void Activate(AdventurePlayer player, AdventureScreen screen, Game game);
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); } }
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); } }
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); } }
public override void Activate(AdventurePlayer player, AdventureScreen screen, Game game) { // }
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); } }
public override bool inRange(AdventurePlayer player) { return false; }
public abstract bool inRange(AdventurePlayer player);
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; }
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; }