Exemplo n.º 1
0
 private void SwitchToSendState()
 {
     ChatListState = EUIChatListState.Send;
     if (PlayerStateUtil.HasUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay))
     {
         PlayerStateUtil.RemoveUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay);
     }
     else
     {
         PlayerStateUtil.AddUIState(EPlayerUIState.ChatOpen, _chatState.gamePlay);
     }
     _chatState.SetCrossVisible(true);
     ResetCloseViewAnim();
 }
        public void ExecuteUserCmd(IPlayerUserCmdGetter getter, IUserCmd cmd)
        {
            var player = getter.OwnerEntity as PlayerEntity;
            PrecisionsVector3 locatorDelta = new PrecisionsVector3(player.characterBoneInterface.CharacterBone.BaseLocatorDelta, 4);
            var clientUpdateComp           = player.playerClientUpdate;
            var gamePlay = player.gamePlay;

            clientUpdateComp.LastSpreadOffsetX             = locatorDelta.x;
            clientUpdateComp.LastSpreadOffsetY             = locatorDelta.y;
            clientUpdateComp.DestoryPreparedThrowingEntity = PlayerStateUtil.HasUIState(gamePlay);
            if (gamePlay.UIStateUpdate)
            {
                gamePlay.UIStateUpdate = false;
                FreeMessageSender.SendOpenSpecifyUIMessageC(player);
            }

            // if ( && )
            // {
            //     FreeMessageSender.SendOpenSpecifyUIMessageC(player);
            // }
        }
Exemplo n.º 3
0
        public override void OnRender(PlayerEntity playerEntity)
        {
            if (!playerEntity.hasPlayerClientUpdate || !playerEntity.gamePlay.UIStateUpdate)
            {
                return;
            }
            playerEntity.gamePlay.UIStateUpdate = false;

            var hasUIState = PlayerStateUtil.HasUIState(playerEntity.gamePlay);

            playerEntity.playerClientUpdate.OpenUIFrame = hasUIState;
            if (hasUIState)
            {
                //playerEntity.ModeController().CallBeforeAction(playerEntity.WeaponController(), EPlayerState..UIOpen);
                var throwing =
                    _contexts.throwing.GetEntityWithEntityKey(playerEntity
                                                              .WeaponController().RelatedThrowAction
                                                              .ThrowingEntityKey);
                if (null != throwing)
                {
                    throwing.isFlagDestroy = true;
                }
            }
        }