public void LoadAIArmyToGame(int points) { LoadAIArmy(points); RecreateUnitsList(); FindObjectOfType <VERY_POORLY_WRITTEN_CLASS>().Okay(); HeroNames.SetHeroName(TurnManager.Instance.PlayerToMove, HeroName); Player.Players[1].Race = Race; }
public void LoadArmyToGame() { LoadPlayerArmy(); RecreateUnitsList(); FindObjectOfType <VERY_POORLY_WRITTEN_CLASS>().Okay(); StartCoroutine(CloseWindow(GameObject.Find("LoadWindowPanel"))); if (GameStateManager.Instance.MatchType == MatchTypes.Online) { GameStateManager.Instance.GetComponent <PhotonView>().RPC("RPCSetHeroName", PhotonTargets.All, TurnManager.Instance.PlayerToMove, HeroName); } else { HeroNames.SetHeroName(TurnManager.Instance.PlayerToMove, HeroName); } }
void RPCSetHeroName(int ID, string name) { HeroNames.SetHeroName(ID, name); }