// Start is called before the first frame update void Start() { st = GameObject.FindGameObjectWithTag("stats").GetComponent <gStats>(); ctrl = 0; friendlyUnitCount = 0; enemyUnitCount = 0; timer = 0; curAttackersHighlighted = false; playerTurn = true; curPhase = GamePhase.Prep; selected = null; typeToAssign = null; //material control for combatants sub1orig = null; sub2orig = null; ih = GameObject.Find("InventoryController").GetComponent <InventoryHandler>(); mk = GameObject.Find("MarketController").GetComponent <MarketController>(); arrow = GameObject.FindGameObjectWithTag("indicator"); lg = gameObject.GetComponent <LevelGenerator>(); levelCount = 0; //uic = GameObject.Find("CTRLPanel").GetComponent<ActiveUIController>(); //mk.initMarketPhase(testLevel); //DontDestroyOnLoad(gameObject); startingDifficulty = 5f; curDifficulty = startingDifficulty; if (!st.isInfinite) { int temp = 0; } else { ctrl += startingCtrlBoost; //GameObject.Find("TutorialPanel").SetActive(false); //FOR SOME REASON, IF I JUST DISABLE THE TUTORIAL PANEL THEN UNITSELECTPANEL MOVES TWICE AS MUCH //WHEN EXPANDING. //TODO: FIGURE OUT WHY THE F**K AND REMOVE THIS SHITTY ASS SOLUTION BELOW. Color setTo = new Color(0, 0, 0, 0); GameObject target = GameObject.Find("TutorialPanel"); target.GetComponent <Image>().color = setTo; target.transform.GetChild(0).GetComponent <Text>().color = setTo; target.transform.GetChild(1).GetComponent <Image>().color = setTo; target.transform.GetChild(1).GetChild(0).GetComponent <Text>().color = setTo; target.transform.GetChild(2).GetComponent <Image>().color = setTo; target.transform.GetChild(2).GetChild(0).GetComponent <Text>().color = setTo; } }
// Start is called before the first frame update void Start() { gc = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>(); sg = GameObject.FindGameObjectWithTag("stats").GetComponent <gStats>(); unitSelectPanel = GameObject.Find("UnitSelectPanel"); marketSlots = new List <MarketSlot>(); storedMarketUnits = new List <bUnit>(); invSlots = new List <MarketSlot>(); marketStartPos = GameObject.Find("MarketStartLoc").transform; marketInvStartPos = GameObject.Find("MarketInvStartLoc").transform; }
private void Start() { gs = GameObject.Find("gStatsHolder").GetComponent <gStats>(); }
// Start is called before the first frame update void Start() { stats = GameObject.FindGameObjectWithTag("stats").GetComponent <gStats>(); }