//public static bool bussSelected; //public static bool civSelected; //public static bool recSelected; //public static bool milSelected; //public static bool medSelected; // Use this for initialization void Start() { //playerResourcesText = gameObject.GetComponent<Text>(); //playerResourcesText.text="Credits: "+playerResourceAmount; gameManager = GameObject.Find("_GameManager").GetComponent <GameManager>(); holder = GameObject.Find("_ResourceHolder").GetComponent <MetricsHolder> (); businessLight = GameObject.Find("/_ART/Assets/BusinessLight"); businessLight.SetActive(true); civilLight = GameObject.Find("/_ART/Assets/CivilLight"); civilLight.SetActive(true); resourcesLight = GameObject.Find("/_ART/Assets/ResourcesLight"); resourcesLight.SetActive(true); militaryLight = GameObject.Find("/_ART/Assets/MilitaryLight"); militaryLight.SetActive(true); mediaLight = GameObject.Find("/_ART/Assets/MediaLight"); mediaLight.SetActive(true); spotlightDesk = GameObject.Find("/_ART/_Lights/Spotlight_Desk"); spotlightDesk.SetActive(true); spotlightPlayerDesk = GameObject.Find("/_ART/_Lights/Spotlight_PlayerDesk"); spotlightPlayerDesk.SetActive(false); commenceButton = GameObject.Find("/_ART/Assets/Button"); commenceButton.SetActive(false); }
void Start() { r2M = GameObject.Find("Stage2Canvas").GetComponent <Round2Manager> (); RS = GameObject.Find("_PlayerResourcesManager").GetComponent <PlayerResourceManager> (); MH = GameObject.Find("_ResourceHolder").GetComponent <MetricsHolder> (); districtAffiliation = Random.Range(30, 60); candidates = new List <Politician> (); distBizAff = districtAffiliation; distCivAff = 100 - districtAffiliation; //Debug.Log (this.name + ": " + distBizAff + "% Biz, " + distCivAff + "% Civ."); for (int i = 0; i < 3; i++) { // 4chan.org/pol/ Politician pol; //string[] alphabet = { "Davis ", "Luke ", "Decan ", "Joseff ", "Aramat ", "Arstok ", "Grant ", "Welkin ", "Vargas ", "Fenn ", "Parker "}; pol.name = alphabet [Random.Range(0, alphabet.Length)] + alphabet [Random.Range(0, alphabet.Length)]; pol.cost = (Random.Range(2, 10) * 100); pol.bizModifier = Random.Range(-6, 6); pol.civModifier = Random.Range(-6, 6); pol.chanceOfWinning = Mathf.Round(Random.Range(0.1f, 0.9f) * Mathf.Pow(10.0f, (float)2)) / Mathf.Pow(10.0f, (float)2); candidates.Add(pol); } }
void Start() { RS = GameObject.Find("_PlayerResourcesManager").GetComponent <PlayerResourceManager> (); holder = GameObject.Find("_ResourceHolder").GetComponent <MetricsHolder> (); totalGlobalAffiliation = holder.globalAffilation; CalcTotalAff(); }
void Awake() { DontDestroyOnLoad(gameObject); if (instance == null) { instance = this; } else { Destroy(gameObject); } }