private void EggIsHatching(object sender, EventArgs args) { if (this.IsExtant) { this._animationPlayer = new LoopedAnimation(this, "Sprites/Monsters/Egg", 2); this.PlaySoundWithCallback(GameSound.EggHatches, HatchingSoundFinished); } }
public ForceField(Vector2 position, int crystalRequired) : base(position) { this._forceFieldState = new ActiveState(this); this._crystalRequired = crystalRequired; this._animationPlayer = new LoopedAnimation(this, "Sprites/Props/ForceField", 6); this.Properties.Set(GameObjectProperties.EffectOfShot, EffectOfShot.Reflection); this.Properties.Set(GameObjectProperties.DrawOrder, (int)SpriteDrawOrder.ForceField); this.Properties.Set(GameObjectProperties.DeadlyToTouch, true); }
public Crystal(Vector2 position, int id, int score, int energy) : base(position) { this.CrystalId = id; this.Score = score; this.Energy = energy; this._animationPlayer = new LoopedAnimation(this, "Sprites/Crystal/Crystal", 8); this.Properties.Set(GameObjectProperties.EffectOfShot, EffectOfShot.Intangible); this.Properties.Set(GameObjectProperties.DrawOrder, (int)SpriteDrawOrder.StaticItem); }
public MonsterEgg(MonsterDef underlyingMonster, int timeToHatch) : base(underlyingMonster.Position) { this._underlyingMonster = underlyingMonster; this.Energy = underlyingMonster.Energy; this._animationPlayer = new LoopedAnimation(this, "Sprites/Monsters/Egg", 6); var timeSpan = TimeSpan.FromSeconds(timeToHatch * Constants.GameClockResolution); this._hatchingTimer = GameTimer.AddGameTimer(timeSpan, EggIsHatching, false); this.Properties.Set(GameObjectProperties.DrawOrder, (int)SpriteDrawOrder.StaticMonster); this.Properties.Set(GameObjectProperties.Solidity, ObjectSolidity.Stationary); }
public PrimedState(Mine mine) : base(mine) { this._animationPlayer = new LoopedAnimation(mine, "Sprites/Shot/MineArmed", 48); mine.PlaySound(GameSound.MineArmed); }
public Potion(Vector2 position) : base(position) { this._animationPlayer = new LoopedAnimation(this, "Sprites/Flask", 48); }