Inheritance: Photon.MonoBehaviour
 public void RemovePlayer(string playerToRemove)
 {
     if (PlayerStatusList.ContainsKey(playerToRemove))
     {
         PlayerStatusList.TryRemove(playerToRemove, out _);
     }
 }
示例#2
0
 public void RemovePlayer(string playerToRemove)
 {
     if (PlayerStatusList.ContainsKey(playerToRemove))
     {
         PlayerStatusList.TryRemove(playerToRemove, out _);
         LunaLog.Log($"[LMP]: Removed {playerToRemove} from Status list");
     }
 }
示例#3
0
        public PlayerStatus GetPlayerStatus(string playerName)
        {
            if (playerName == SettingsSystem.CurrentSettings.PlayerName)
            {
                return(MyPlayerStatus);
            }

            return(PlayerStatusList.ContainsKey(playerName) ? PlayerStatusList[playerName] : null);
        }
示例#4
0
        private void InitializePlayerStatusList()
        {
            var playerNamesToMonitor = ConfigurationManager.AppSettings["PlayerNamesToMonitor"].Split(';');

            foreach (var playerName in playerNamesToMonitor)
            {
                PlayerStatusList.Add(new PlayerStatusViewModel(playerName));
            }
        }
示例#5
0
 public void RemovePlayer(string playerToRemove)
 {
     if (PlayerStatusList.ContainsKey(playerToRemove))
     {
         PlayerStatusList.Remove(playerToRemove);
         Debug.Log($"[LMP]: Removed {playerToRemove} from Status list");
     }
     else
     {
         Debug.LogError("[LMP]: Cannot remove non-existant player " + playerToRemove);
     }
 }
示例#6
0
        private void MonitorServicePlayerStatusChanged(PlayerStatusModel playerStatusModel)
        {
            if (PlayerStatusChanged != null)
            {
                PlayerStatusChanged(playerStatusModel);
            }

            var updatedPlayer = PlayerStatusList.First(x => x.Name == playerStatusModel.Name);

            updatedPlayer.Status           = playerStatusModel.Status;
            updatedPlayer.PlayerProfileUrl = playerStatusModel.PlayerProfileUrl;
        }
示例#7
0
 public void RemovePlayer(string playerToRemove)
 {
     if (PlayerStatusList.ContainsKey(playerToRemove))
     {
         PlayerStatusList.TryRemove(playerToRemove, out _);
         LunaLog.Log($"[LMP]: Removed {playerToRemove} from Status list");
     }
     else
     {
         LunaLog.LogError($"[LMP]: Cannot remove non-existant player {playerToRemove}");
     }
 }
示例#8
0
 protected override void OnDisabled()
 {
     base.OnDisabled();
     PlayerStatusList.Clear();
     MyPlayerStatus.StatusText = "Syncing";
 }
示例#9
0
 public PlayerStatus GetPlayerStatus(string playerName)
 {
     return(PlayerStatusList.ContainsKey(playerName) ? PlayerStatusList[playerName] : null);
 }
示例#10
0
 public void Start()
 {
     _monitorService.Start(PlayerStatusList.Select(x => x.Name));
 }
示例#11
0
 protected override void OnDisabled()
 {
     base.OnDisabled();
     PlayerStatusList.Clear();
 }
示例#12
0
 public override void OnDisabled()
 {
     base.OnDisabled();
     PlayerStatusList.Clear();
 }