Example #1
0
        public override void UpdateStatus(FightStatus fightStatus)
        {
            PlayerType   playerType   = (PlayerType)(isLocalPlayer ? 13 : (((teamIndex == GameStatus.localPlayerTeamIndex) ? 1 : 2) | ((fightStatus == FightStatus.local) ? 4 : 0)));
            PlayerStatus playerStatus = new PlayerStatus(concernedEntity, fightStatus.fightId, index, teamId, teamIndex, name, playerType);

            fightStatus.AddEntity(playerStatus);
            playerStatus.SetCarac(CaracId.ActionPoints, baseActionPoints);
            if (isLocalPlayer)
            {
                fightStatus.localPlayerId = concernedEntity;
                CameraHandler current = CameraHandler.current;
                if (null != current)
                {
                    DirectionAngle mapRotation = GameStatus.GetMapRotation(playerStatus);
                    current.ChangeRotation(mapRotation);
                }
            }
            FightUIRework instance = FightUIRework.instance;

            if (null != instance)
            {
                AbstractPlayerUIRework abstractPlayerUIRework2 = playerStatus.view = ((!isLocalPlayer) ? ((AbstractPlayerUIRework)instance.AddPlayer(playerStatus)) : ((AbstractPlayerUIRework)instance.GetLocalPlayerUI(playerStatus)));
                abstractPlayerUIRework2.SetPlayerStatus(playerStatus);
                abstractPlayerUIRework2.SetPlayerName(playerStatus.nickname);
                abstractPlayerUIRework2.SetRankIcon(0);
                abstractPlayerUIRework2.SetActionPoints(baseActionPoints);
                abstractPlayerUIRework2.SetReservePoints(0);
                abstractPlayerUIRework2.SetElementaryPoints(0, 0, 0, 0);
            }
        }