private void LoadPlayer() { // Setup variables Animator = Controller.Animator; Animator.Networker = this; Animator.Initialize(Controller); if (!IsOwner) { } else { Instance = this; foreach (Hitbox hitbox in GetComponentsInChildren <Hitbox>()) { hitbox.gameObject.layer = 13; } Enviro.TeamBasedColor.Instance.UpdateColors(nv_Team.Value); Settings.GameSettingsManager.Instance.ApplySettings(); } // Disable / Enable Controller.isOwner = IsOwner; foreach (GameObject go in DisableObjects) { go.SetActive(IsOwner); } }
private void UpdateActivity() { var activity = new Discord.Activity(); activity.State = "In " + GetSceneName(); activity.Assets.LargeImage = GetSceneName(true); activity.Assets.LargeText = GetSceneName(); if (NetworkingManager.Singleton.IsClient) { activity.Details = string.Format("{0} ({1})", GetSceneName(), Enum.GetName(typeof(Game.Game.GameModes), Game.Game.Instance.Mode)); activity.State = "In Match"; if (Player.Networker.Instance != null) { Player.Networker a = Player.Networker.Instance; activity.Assets.SmallImage = a.nv_Team.Value == 2 ? "beta" : "alpha"; activity.Assets.SmallText = a.nv_Team.Value == 2 ? "Team Beta" : "Team Alpha"; } activity.Party.Size.CurrentSize = NetworkingManager.Singleton.ConnectedClientsList.Count; activity.Party.Size.MaxSize = 12;//DB_API.Match.PlayerLimit } activityManager.UpdateActivity(activity, callback => { Debug.Log("Discord: " + callback); }); }