예제 #1
0
        protected void EndTargetingPhase()
        {
            FightStatus local = FightStatus.local;

            if (local.currentTurnPlayerId == local.localPlayerId)
            {
                if (m_fightMap.IsInTargetingPhase())
                {
                    m_fightMap.SetMovementPhase();
                }
            }
            else
            {
                m_fightMap.SetNoInteractionPhase();
            }
        }
예제 #2
0
        private static void RevertFightMapTargetingPhase(FightMap fightMap)
        {
            FightStatus local = FightStatus.local;

            if (local != null && local.currentTurnPlayerId == s_playerCasting.id)
            {
                if (fightMap.IsInTargetingPhase())
                {
                    fightMap.SetMovementPhase();
                }
            }
            else
            {
                fightMap.EndCurrentPhase();
            }
        }
예제 #3
0
        public override void UpdateStatus(FightStatus fightStatus)
        {
            fightStatus.currentTurnPlayerId = concernedEntity;
            foreach (CharacterStatus item in fightStatus.EnumerateEntities((CharacterStatus c) => c.ownerId == concernedEntity))
            {
                item.actionUsed = false;
            }
            fightStatus.NotifyEntityPlayableStateChanged();
            if (fightStatus != FightStatus.local || fightStatus.localPlayerId != concernedEntity)
            {
                return;
            }
            FightMap current = FightMap.current;

            if (null != current)
            {
                current.SetMovementPhase();
            }
            FightUIRework instance = FightUIRework.instance;

            if (null != instance)
            {
                instance.StartLocalPlayerTurn();
            }
            if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus))
            {
                AbstractPlayerUIRework view = entityStatus.view;
                if (null != view)
                {
                    view.SetUIInteractable(interactable: true);
                }
            }
            else
            {
                Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 55, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\TurnStartedEvent.cs");
            }
        }