public SpawnEnvironmentEffectEvent(VTankBot _game, int id, int typeId, VTankObject.Point location, int ownerId) : base(_game) { this.id = id; this.typeId = typeId; this.location = location; this.ownerId = ownerId; envEffect = WeaponLoader.GetEnvironmentProperty(typeId); }
public override void DoAction() { envEffect = WeaponLoader.GetEnvironmentProperty(typeId); creationPosition = this.GetPosition(); if (Game.Players.ContainsKey(ownerId)) { envEffect.Owner = Game.Players[ownerId]; } Game.EnvironmentEffects.AddEffect(envEffect, id, creationPosition); }