public Cloak(Actor self, CloakInfo info) { this.info = info; this.self = self; remainingTime = info.InitialDelay; }
public Cloak(Actor self, CloakInfo info) { this.info = info; this.self = self; remainingTime = info.InitialDelay; crateDisabled = info.RequiresCrate; }
public Cloak(Actor self, CloakInfo info) { this.self = self; Info = info; remainingTime = info.InitialDelay; // Disable if an upgrade is required disabled = info.RequiresUpgrade != null; }
public override void Activate(Actor collector) { var cloakInfo = new CloakInfo(Info.InitialDelay, Info.CloakDelay, Info.CloakSound, Info.UncloakSound); var cloak = cloakInfo.Create(new ActorInitializer(collector, new TypeDictionary() )); collector.World.AddFrameEndTask(w => { w.Remove(collector); collector.AddTrait(cloak); if (collector.HasTrait<TargetableUnit<TargetableUnitInfo>>()) collector.Trait<TargetableUnit<TargetableUnitInfo>>().RecievedCloak(collector); w.Add(collector); }); base.Activate(collector); }