void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); levelManager = GetComponent <LevelManager> (); boardManager = GetComponent <BoardManager> (); clickManager = GetComponent <ClickManager> (); gopherManager = GetComponent <GopherManager> (); catManager = GetComponent <CatManager> (); dogManager = GetComponent <DogManager> (); dogCatcherManager = GetComponent <DogCatcherManager> (); policeManager = GetComponent <PoliceManager> (); bloodHoundManager = GetComponent <BloodhoundManager> (); militaryManager = GetComponent <MilitaryManager> (); enemyMilitaryManager = GetComponent <EnemyMilitaryManager> (); audioManager = GetComponent <AudioSource> (); managers.Add(gopherManager); managers.Add(catManager); managers.Add(dogManager); managers.Add(dogCatcherManager); managers.Add(policeManager); managers.Add(bloodHoundManager); managers.Add(militaryManager); managers.Add(enemyMilitaryManager); Screen.SetResolution(800, 800, false); }
public void SaveDecks(MilitaryManager GameMilitaryManager) { //PlayerDecks.ForEach(MilitaryDecks => { // GameMilitaryManager.PlayerMilitaryList.Add(new Tuple<List<DeckDataItem>,Vector2>(MilitaryDecks, MilitaryDecks.DeckCurrentWorldLocation)); // if (MilitaryDecks.) //}); }
private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } }
// Use this for initialization void Start() { GameWorldManager = FindObjectOfType <WorldManager>(); GameMapManager = FindObjectOfType <MapManager>(); GamePlayerCountryManager = GameMapManager.GamePlayerCountryManager; GameBattleManager = FindObjectOfType <BattleManager>(); GameCharacterManager = FindObjectOfType <CharacterManager>(); GameDeckManager = FindObjectOfType <DeckManager>(); GameIntelManager = FindObjectOfType <IntelManager>(); GameMilitaryManager = FindObjectOfType <MilitaryManager>(); GameResearchManager = FindObjectOfType <ResearchManager>(); GameTradeManager = FindObjectOfType <TradeManager>(); GameUnitManager = FindObjectOfType <UnitManager>(); //DontDestroyOnLoad(transform.gameObject); }
// Use this for initialization void Start() { wmslObj = WMSK.instance; if (WorldGovernments.Count == 0) { countryFactory = new CountryRelationsFactory(); WorldGovernments = countryFactory.CreateOldWorldOrder(); //World governments needs to get injected into WorldCountryManagent } StartCoroutine(IntializeWorld(WorldGovernments)); GameMapManager = FindObjectOfType <MapManager>(); GameMilitaryManager = FindObjectOfType <MilitaryManager>(); StartCoroutine(GameMilitaryManager.SetNavalGroups(GameMapManager.GamePlayerCountryManager)); //WMSK.instance.SetCountriesAttributes(jsonCountries); }
private void Start() { RessourcesSecondaireCard = new List <GameObject>(); RessourcesPrimairesCard = new List <GameObject>(); InitializeArgent(); InitializeImage(); PlayerManager = GameObject.FindGameObjectWithTag("PlayerManager").GetComponent <PlayerManager>(); PlayerAdverse = PlayerNumber == 0 ? PlayerManager.GetComponent <PlayerManager>().Player2.GetComponent <Player>() : PlayerManager.GetComponent <PlayerManager>().Player1.GetComponent <Player>(); _scienceManager = GameObject.Find("ScienceManager").GetComponent <ScienceManager>(); pieceMilitaire = GameObject.Find("MilitaryManager").GetComponent <MilitaryManager>(); _playerNameTxt.GetComponent <Text>().text = PlayerName; }