private void Update() { CheckUserInput(); if ((!isEnabled && !isEnabledTemp) || !minimapIsCreated || minimapIcons == null) { return; } for (int i = 0; i < minimapIcons.Length; i++) { MinimapIcon minimapIcon = minimapIcons[i]; if (minimapIcon == null) { RCextensions.RemoveAt(ref minimapIcons, i); } else if (!minimapIcon.UpdateUI(minimapOrthographicBounds, maximized ? ((float)MINIMAP_SIZE) : MINIMAP_CORNER_SIZE)) { minimapIcon.Destroy(); RCextensions.RemoveAt(ref minimapIcons, i); } } }
public bool Instantiated(PhotonPlayer owner, GameResource type) { if (TryGetPlayer(owner.Id, out int result)) { if (Players[result].IsResourceExcessive(type)) { if (owner != null && PhotonNetwork.isMasterClient) { FengGameManagerMKII.Instance.KickPlayer(owner, ban: true, "spamming instantiate (" + type.ToString() + ")."); } RCextensions.RemoveAt(ref Players, result); return(false); } } else { RCextensions.Add(ref Players, new Player(owner.Id)); Players[Players.Length - 1].IsResourceExcessive(type); } return(true); }
public bool Instantiated(PhotonPlayer owner, GameResource type) { int num; if (this.TryGetPlayer(owner.ID, out num)) { if (this.players[num].IsThingExcessive(type)) { PhotonPlayer player = owner; if ((player != null) && PhotonNetwork.isMasterClient) { FengGameManagerMKII.instance.kickPlayerRC(player, true, "spamming instantiate (" + type.ToString() + ")."); } RCextensions.RemoveAt <Player>(ref this.players, num); return(false); } } else { RCextensions.Add <Player>(ref this.players, new Player(owner.ID)); this.players[this.players.Length - 1].IsThingExcessive(type); } return(true); }