Пример #1
0
 public Limb(LimbComponentType type, LimbPosition position, float humanoidZ, bool isHuman)
     : this(type, position, humanoidZ)
 {
     if (isHuman)
     {
         this.arm   = ArmSubType.Human;
         this.head  = HeadSubType.Human;
         this.leg   = LegSubType.Human;
         this.torso = TorsoSubType.Human;
     }
 }
Пример #2
0
 public Limb(Limb other, LimbPosition newPosition, float humanoidZ)
     : base()
 {
     this.type      = other.type;
     this.position  = newPosition;
     this.arm       = other.arm;
     this.head      = other.head;
     this.leg       = other.leg;
     this.torso     = other.torso;
     this.humanoidZ = humanoidZ;
 }
Пример #3
0
 //make a random limb of this type
 public Limb(LimbComponentType type, LimbPosition position, float humanoidZ)
     : base()
 {
     this.type      = type;
     this.position  = position;
     this.arm       = (ArmSubType)random.Next(0, 3);
     this.head      = (HeadSubType)headChoice[random.Next(0, headChoice.Length)];
     this.leg       = (LegSubType)random.Next(0, 2);
     this.torso     = (TorsoSubType)random.Next(0, 1);
     this.humanoidZ = humanoidZ;
 }
Пример #4
0
    public void UpdateTargetLimb(LimbPosition targetLimb, LimbAction action)
    {
        //print(currMimic.UpperLeft.transform.rotation.eulerAngles.z);

        switch (targetLimb)
        {
        case LimbPosition.LowerLeft:
            LowerLeft.UpdateLimb(action, currMimic.LowerLeft.transform.rotation.eulerAngles.z);
            break;

        case LimbPosition.LowerRight:
            LowerRight.UpdateLimb(action, currMimic.LowerRight.transform.rotation.eulerAngles.z);
            break;

        case LimbPosition.UpperLeft:
            UpperLeft.UpdateLimb(action, currMimic.UpperLeft.transform.rotation.eulerAngles.z);
            break;

        case LimbPosition.UpperRight:
            UpperRight.UpdateLimb(action, currMimic.UpperRight.transform.rotation.eulerAngles.z);
            break;
        }
    }