override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { base.OnStateEnter(animator, stateInfo, layerIndex); lazyInit(animator); switch (groundStabController.groundStabStateType) { case GroundStabStateType.loop: if (istoground) { waittime = groundStabController.attackTime; } else { waittime = groundStabController.downTime; } break; } if (groundStabController.first == false) { //waittime = groundStabController.firststate; //frist = false; groundStabController.OnOfftoStab(animator, waittime, istoground == true ? 0 : 1); } else { waittime = groundStabController.firststate; groundStabController.OnOfftoStab(animator, waittime, istoground == true ? 0 : 1); } //groundStabController.OnOfftoStab(animator, waittime, istoground == true ? 0 : 1); }
void FirstGrandstabWaitLoopDataDic() { foreach (var keyValue in GrandstabWaitLoopDataDic) { GroundStabController groundStabController = keyValue.Value; float time = groundStabController.firststate; Animator animator = groundStabController.MainAnimator; if (groundStabController.first) { groundStabController.OnOfftoStab(animator, time, 1); } } }