public void Destroy(ref BobEffect.Data data) { if (this.loaded && data != null) { this.CloseData(data); data = null; } }
public BOBRES Simulate(ref BobEffect.Context ctx) { if (!this.loaded) { return BOBRES.ERROR; } return this.SimulateData(ref ctx); }
protected override void OnAddonAwake() { CharacterOverlayTrait trait = base.GetTrait <CharacterOverlayTrait>(); this.damageOverlay = trait.damageOverlay; this.damageOverlay2 = trait.damageOverlay2; this.takeDamageBob = trait.takeDamageBob as BobEffect; this.meleeBob = trait.meleeBob as BobEffect; }
public bool Create(out BobEffect.Data data) { if (!this.loaded) { this.InitializeNonSerializedData(); this.loaded = true; } return this.OpenData(out data); }
public bool CreateInstance(BobEffect effect) { BobEffect.Data data; if ((effect == null) || !effect.Create(out data)) { return(false); } this.data.Add(data); foreach (BobEffectStack stack in this.forks) { stack.data.Add(data.Clone()); } return(true); }
public bool CreateInstance(BobEffect effect) { BobEffect.Data datum; if (!effect || !effect.Create(out datum)) { return(false); } this.data.Add(datum); foreach (BobEffectStack fork in this.forks) { fork.data.Add(datum.Clone()); } return(true); }
public bool CreateInstance(BobEffect effect) { BobEffect.Data datum; if (!effect || !effect.Create(out datum)) { return false; } this.data.Add(datum); foreach (BobEffectStack fork in this.forks) { fork.data.Add(datum.Clone()); } return true; }
protected abstract BOBRES SimulateData(ref BobEffect.Context ctx);
protected abstract bool OpenData(out BobEffect.Data data);
protected abstract void CloseData(BobEffect.Data data);
public virtual void CopyDataTo(BobEffect.Data target) { target.force = this.force; target.torque = this.torque; }
public bool AddEffect(BobEffect effect) { return(this.working.stack.CreateInstance(effect)); }
protected override void OnAddonAwake() { CharacterOverlayTrait trait = base.GetTrait<CharacterOverlayTrait>(); this.damageOverlay = trait.damageOverlay; this.damageOverlay2 = trait.damageOverlay2; this.takeDamageBob = trait.takeDamageBob as BobEffect; this.meleeBob = trait.meleeBob as BobEffect; }
public bool AddEffect(BobEffect effect) { return this.working.stack.CreateInstance(effect); }