public void HandleAnimation(string animation) { // if there the animation doesn't exist... don't play anything so the simulation doesn't break. if(animation == "") { return; } if (inst.arms == null || inst.baby == null) { arms = ArmAnimatorController.Instance; baby = BabyAnimatorController.Instance; } arms.TriggerAnimation (animation); baby.TriggerAnimation (animation); }
public AnimationHandler() { arms = ArmAnimatorController.Instance; baby = BabyAnimatorController.Instance; }
// Use this for initialization void Awake() { Instance = this; animations = new BabyAnimationContainer (); animator = GetComponent<Animator> (); }