public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { /*AnimatorClipInfo[] _arrClipInfos = animator.GetCurrentAnimatorClipInfo(layerIndex); * AnimatorClipInfo c = _arrClipInfos[0]; * slipName = c.clip.name;*/ //Debug.Log("animator.name : " + animator.name + " c.clip.name " + c.clip.name + " stateInfo.length :" + stateInfo.length + " nameHash " + (Animator.StringToHash(c.clip.name) == stateInfo.shortNameHash)); //if (stateInfo.length > 0) //{ /*AnimationClip _clip = new AnimationClip(); * AnimationEvent _event = new AnimationEvent(); * _event.functionName = "OnClipEvent"; * _event.intParameter = 1; * _event.time = 0.6f; * _clip.AddEvent(_event);*/ /*MyStateMachineBehaviour myState = animator.GetBehaviour<MyStateMachineBehaviour>(); * Debug.Log("-----------------------" + myState._name);*/ //} _enity = animator.transform.GetComponentInParent <EnityBind>().Owner; _enityData = _enity.GetProperty("enityData") as EnityData; _enity.SetProperty("onStateEnter", stateInfo); DataEventSource.Instance.DispatcherEvent("onStateEnter", stateInfo); _isEnd = false; _isLock = AnimatorManager.Instance.IsLock(stateInfo.shortNameHash); if (_isLock) { IsLock = _isLock; } GameInput.Log(" state enter >>>>>>>>>>>>>>>>>>>>>>>>> " + AnimatorManager.Instance.HashToString(stateInfo.shortNameHash)); }
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { /*AnimatorClipInfo[] _arrClipInfos = animator.GetCurrentAnimatorClipInfo(layerIndex); AnimatorClipInfo c = _arrClipInfos[0]; slipName = c.clip.name;*/ //Debug.Log("animator.name : " + animator.name + " c.clip.name " + c.clip.name + " stateInfo.length :" + stateInfo.length + " nameHash " + (Animator.StringToHash(c.clip.name) == stateInfo.shortNameHash)); //if (stateInfo.length > 0) //{ /*AnimationClip _clip = new AnimationClip(); AnimationEvent _event = new AnimationEvent(); _event.functionName = "OnClipEvent"; _event.intParameter = 1; _event.time = 0.6f; _clip.AddEvent(_event);*/ /*MyStateMachineBehaviour myState = animator.GetBehaviour<MyStateMachineBehaviour>(); Debug.Log("-----------------------" + myState._name);*/ //} _enity = animator.transform.GetComponentInParent<EnityBind>().Owner; _enityData = _enity.GetProperty("enityData") as EnityData; _enity.SetProperty("onStateEnter",stateInfo); DataEventSource.Instance.DispatcherEvent("onStateEnter", stateInfo); _isEnd = false; _isLock = AnimatorManager.Instance.IsLock(stateInfo.shortNameHash); if (_isLock) { IsLock = _isLock; } GameInput.Log(" state enter >>>>>>>>>>>>>>>>>>>>>>>>> " + AnimatorManager.Instance.HashToString(stateInfo.shortNameHash)); }
public override void OnStateEnter(UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, int layerIndex) { //DataEventSource.Instance.DispatcherEvent("onStateEnter", stateInfo); _enity = animator.transform.GetComponentInParent <EnityBind>().Owner; _enityData = _enity.GetProperty("enityData") as EnityData; _isEnd = false; _isLock = AnimatorManager.Instance.IsLock(stateInfo.shortNameHash); if (_isLock) { IsLock = _isLock; } }
public override void OnStateEnter(UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, int layerIndex) { //DataEventSource.Instance.DispatcherEvent("onStateEnter", stateInfo); _enity = animator.transform.GetComponentInParent<EnityBind>().Owner; _enityData = _enity.GetProperty("enityData") as EnityData; _isEnd = false; _isLock = AnimatorManager.Instance.IsLock(stateInfo.shortNameHash); if (_isLock) { IsLock = _isLock; } }