private bool CheckChanges(bool hasMotor, Transform parent) { if ((this.hadMotor == hasMotor) && (this.otherParent == parent)) { return(false); } this.hadMotor = hasMotor; this.groundLocalVelocity = new Vector3G(); this.groundWorldVelocity = new Vector3G(); this.localVelocity = new Vector3G(); this.worldVelocity = new Vector3G(); this.impulseForce = new VectorAccelSampler(); this.impulseTorque = new VectorAccelSampler(); this.lastPosition = new VectorStamp(); this.otherParent = parent; this.raw_pos = new Vector3G(); this.raw_rot = new Vector3G(); BobEffectStack stack = this.predicted.stack; this.predicted = new Weight(); this.predicted.stack = stack; stack = this.working.stack; this.working = new Weight(); this.working.stack = stack; return(true); }
public BobEffectStack Fork() { BobEffectStack bobEffectStack = new BobEffectStack() { isFork = true, owner = (!this.isFork ? this : this.owner) }; bobEffectStack.owner.forks.Add(bobEffectStack); foreach (BobEffect.Data datum in bobEffectStack.owner.data) { bobEffectStack.data.Add(datum.Clone()); } return bobEffectStack; }
public BobEffectStack Fork() { BobEffectStack item = new BobEffectStack { isFork = true, owner = !this.isFork ? this : this.owner }; item.owner.forks.Add(item); foreach (BobEffect.Data data in item.owner.data) { item.data.Add(data.Clone()); } return(item); }
public BobEffectStack Fork() { BobEffectStack bobEffectStack = new BobEffectStack() { isFork = true, owner = (!this.isFork ? this : this.owner) }; bobEffectStack.owner.forks.Add(bobEffectStack); foreach (BobEffect.Data datum in bobEffectStack.owner.data) { bobEffectStack.data.Add(datum.Clone()); } return(bobEffectStack); }
public void Dispose() { if (!this.isFork) { foreach (BobEffectStack stack in this.forks) { stack.DestroyAllEffects(); } } else { this.DestroyAllEffects(); this.owner.forks.Remove(this); this.owner = null; this.isFork = false; } }
public void Dispose() { if (this.isFork) { this.DestroyAllEffects(); this.owner.forks.Remove(this); this.owner = null; this.isFork = false; } else { foreach (BobEffectStack fork in this.forks) { fork.DestroyAllEffects(); } } }
public bool IsForkOf(BobEffectStack stack) { return((this.owner != null) && (this.owner == stack)); }
public bool IsForkOf(BobEffectStack stack) { return(this.owner == null ? false : this.owner == stack); }
public bool IsForkOf(BobEffectStack stack) { return (this.owner == null ? false : this.owner == stack); }