public TileObject(TileObjectManager manager, int tilePosX, int tilePosY) { this.manager = manager; tilePositionX = tilePosX; tilePositionY = tilePosY; }
public Powerup(TileObjectManager manager, int tilePosX, int tilePosY, PowerupType pType, Texture2D tex, SoundEffectInstance powerupSound) : base(manager, tilePosX, tilePosY) { this.pType = pType; this.powerupTex = tex; this.powerupSoundInstance = powerupSound; Solid = false; //Hook to destroy when burnt OnFireSpread += Destroy; OnPlayerCollision += PlayerCollect; }
public SoftBlock(TileObjectManager manager, int tilePosX, int tilePosY, Texture2D tex, AnimatedSprite destroyAnimation, int type) : base(manager, tilePosX, tilePosY) { blockTex = tex; Solid = true; isDead = false; //Hook to destroy when burnt OnFireSpread += Destroy; this.blockType = type; sourceRect = new Rectangle(0, type * GlobalGameData.tileSize, GlobalGameData.tileSize, GlobalGameData.tileSize); this.destroyAnimation = destroyAnimation; }
public Bomb(TileObjectManager manager, int tilePosX, int tilePosY, Texture2D tex, int power, SoundEffectInstance explodeSound) : base(manager, tilePosX, tilePosY) { bombTex = tex; Solid = true; this.explodeSoundInstance = explodeSound; lifeTimer = new EventTimer(0, 4); this.power = power; //Hook to explode when life ends lifeTimer.OnEnd += Explode; OnFireSpread += Explode; }
public Powerup CreatePowerup(TileObjectManager manager, int tilePosX, int tilePosY, PowerupType pType) { if (!loaded) return null; Texture2D pTex; switch (pType) { case PowerupType.BOMB_UP: pTex = powerupTex[0]; break; case PowerupType.FIRE_UP: pTex = powerupTex[1]; break; case PowerupType.SPEED_UP: pTex = powerupTex[2]; break; default: pTex = powerupTex[0]; break; } return new Powerup(manager, tilePosX, tilePosY, pType, pTex, powerupSoundInstance); }
public FireManager(TileObjectManager tileObjectManager) { this.tileObjectManager = tileObjectManager; }
public SoftBlock CreateSoftBlock(TileObjectManager manager, int tilePosX, int tilePosY, int softblockType) { if (!loaded) return null; return new SoftBlock(manager, tilePosX, tilePosY, blockTex, destroySoftblockAnimation, softblockType); }
public Bomb CreateBomb(TileObjectManager manager, int tilePosX, int tilePosY, int power) { if (!loaded) return null; return new Bomb(manager, tilePosX, tilePosY, bombTex, power, bombExplosionSoundInstance); }