namespace Passer.CreatureControl { public class Insect : Creature { public Leg leftFrontLeg; public Leg leftMiddleLeg; public Leg leftHindLeg; public Leg rightFrontLeg; public Leg rightMiddleLeg; public Leg rightHindLeg; protected virtual void Update() { UpdateBones(); } public override void UpdateBones() { base.UpdateBones(); if (this.targetRig.leftFrontLeg != null) this.targetRig.leftFrontLeg.UpdateBones(this.leftFrontLeg); if (this.targetRig.leftMiddleLeg != null) this.targetRig.leftMiddleLeg.UpdateBones(this.leftMiddleLeg); if (this.targetRig.leftBackLeg != null) this.targetRig.leftBackLeg.UpdateBones(this.leftHindLeg); if (this.targetRig.rightFrontLeg != null) this.targetRig.rightFrontLeg.UpdateBones(this.rightFrontLeg); if (this.targetRig.rightMiddleLeg != null) this.targetRig.rightMiddleLeg.UpdateBones(this.rightMiddleLeg); if (this.targetRig.rightBackLeg != null) this.targetRig.rightBackLeg.UpdateBones(this.rightHindLeg); } } }