Пример #1
0
    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);
    }
Пример #2
0
 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;
 }
Пример #3
0
    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);
    }
Пример #4
0
    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);
    }
Пример #5
0
 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;
     }
 }
Пример #6
0
 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();
         }
     }
 }
Пример #7
0
 public bool IsForkOf(BobEffectStack stack)
 {
     return((this.owner != null) && (this.owner == stack));
 }
Пример #8
0
 public bool IsForkOf(BobEffectStack stack)
 {
     return(this.owner == null ? false : this.owner == stack);
 }
Пример #9
0
 public bool IsForkOf(BobEffectStack stack)
 {
     return (this.owner == null ? false : this.owner == stack);
 }