コード例 #1
0
        public override IEnumerator UpdateView(FightStatus fightStatus)
        {
            if (fightStatus.TryGetEntity(concernedEntity, out PlayerStatus entityStatus))
            {
                AbstractPlayerUIRework view = entityStatus.view;
                if (null != view)
                {
                    switch (element)
                    {
                    case 14:
                        view.ChangeAirElementaryPoints(valueAfter);
                        break;

                    case 13:
                        view.ChangeEarthElementaryPoints(valueAfter);
                        break;

                    case 11:
                        view.ChangeFireElementaryPoints(valueAfter);
                        break;

                    case 12:
                        view.ChangeWaterElementaryPoints(valueAfter);
                        break;

                    default:
                        throw new ArgumentException();
                    }
                    yield return(view.UpdateAvailableCompanions());
                }
            }
            else
            {
                Log.Error(FightEventErrors.PlayerNotFound(concernedEntity), 70, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\Events\\ElementPointsChangedEvent.cs");
            }
            FightLogicExecutor.FireUpdateView(fightStatus.fightId, EventCategory.ElementPointsChanged);
        }