Beispiel #1
0
        public void PlayerAdMove(Vector3 direction)
        {
            SelfPlayer player = PlayerManager.Instance.LocalPlayer;
            // if 有stop buf 则 return
            // if state == dead || run || relive 则 return

            float moveSpeed = player.EntityFSMMoveSpeed;

            if (moveSpeed <= 0)
            {
                moveSpeed = 3.0f;
            }
            // player.EntityFSMChangedata(player.RealObject.transform.position, direction, moveSpeed);
            // player.OnFSMStateChange();
        }
Beispiel #2
0
        public Entity HandleCreateEntity(UInt64 guid, EEntityCampType campType)
        {
            Player player = null;

            UDK.Output.Dump(UserInfoModel.Instance.IsLocalPlayer(guid), "88888");
            if (true || UserInfoModel.Instance.IsLocalPlayer(guid))
            {
                player = new SelfPlayer(guid, campType);
            }
            else
            {
                player = new Player(guid, campType);
            }
            player.GameUserId = guid;
            return(player);
        }
Beispiel #3
0
        void onStickEndDrag(GameObject gameObject, PointerEventData eventDat)
        {
            mStickTransform.anchoredPosition = mStickPointTransform.anchoredPosition;

            if (mStickState == StickState.Move)
            {
                MessageCenter.Instance.AskStopMove();
            }
            SelfPlayer player = PlayerManager.Instance.LocalPlayer;

            if (player != null && player.FSM != null)    // && player.FSM.State == EFSMState.ADMOVE
            {
                player.OnFSMStateChange(EntityFreeFSM.Instance);
            }

            mStickState = StickState.InActive;
        }