public void Update(Vector3 pos, uint elapsed) { if (mPaoPao != null) { if (PlayerController.Instance.IsAutoMoving) { mPaoPao.Hide(); } else { if (mCurItem != null) { mPaoPao.Show(); mPaoPao.Update(pos, elapsed); } } } }
override public bool Update(uint elapsed) { if (!base.Update(elapsed)) { return(false); } if (mPaoPao != null) { Vector3 headPos = this.GetBonePositionByName("head"); if (headPos != Vector3.zero) { headPos = CameraController.Instance.WorldToScreenPoint(headPos); headPos.z = 0.0f; mPaoPao.Update(headPos, elapsed); } } if (mRoleState != RoleState.RoleState_Idle) { if (!IsMoveing()) { ChangeState(RoleState.RoleState_Idle); } } else if (mRoleState != RoleState.RoleState_Moving) { if (IsMoveing()) { ChangeState(RoleState.RoleState_Moving); } } refreshMoveAnimation(); UpdateAttachMent(); UpdateWingAnim(elapsed); return(true); }