public void AttachToUiHandler(LocalPlayerMotionHandler uiHandle) { this.OnJoyStickTouchBegin += uiHandle.JoyStickBegin; this.OnJoyStickTouchMove += uiHandle.JoyStickMove; this.OnJoyStickTouchEnd += uiHandle.JoyStickEnd; this.OnJoyStickClick += uiHandle.JoyStickClick; }
public void AttachToUiHandler(LocalPlayerMotionHandler uiHandle) { foreach (UIJoyButton btn in this.mBtnList) { btn.AttachToUiHandler(uiHandle); } }
void Start() { //测试入口 LocalPlayerMotionHandler playerHandler = GameObject.FindGameObjectWithTag("Player").GetComponent <LocalPlayerMotionHandler>(); this.AttachToUiHandler(playerHandler); this.AttachToUiHandler(playerHandler); }
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { this.mCallBackFrameQueue = new Queue<StateCallBackFrame>(); for (int i = 0; i < this.mCallBackFrames.Count; ++i) { this.mCallBackFrameQueue.Enqueue(this.mCallBackFrames[i]); } this.mLocalMotion = animator.GetComponent<LocalPlayerMotionHandler>(); }
public void AttachToUiHandler(LocalPlayerMotionHandler uiHandle) { this.mCallBackFunction = uiHandle.OnUiJoyButtonEvent; }