// Use this for initialization public void Init() { textboxManager = FindObjectOfType <TextBoxManager>(); tutMode = GetComponent <TutorialMode>(); statsMenu = GetComponent <Player2D_StatsMenu>(); tutSpawn = GetComponent <TutorialSpawn>(); inventory = GetComponent <Inventory>(); #if UNITY_EDITOR || UNITY_STANDALONE textboxManager.ReloadScript(theTextConsole); #elif UNITY_ANDROID || UNITY_IPHONE textboxManager.ReloadScript(theTextMobile); #endif textboxManager.currentLine = startLine; textboxManager.endAtLine = endLine; textboxManager.EnableTextBox(); MovedW = false; MovedA = false; MovedS = false; MovedD = false; chestOpened = false; triedPause = triedPP = triedAttack = triedMove = triedCollecting = triedInventory = triedMerchant = triedTrap1 = triedTrap2 = triedTrap3 = triedTrap4 = false; pauseBox = false; }
void Start() { economySystem = GameObject.Find("EconomySystem"); economy = economySystem.GetComponent <Economy>(); EnemySpawn = GameObject.Find("EnemySpawn"); tutorialSpawn = EnemySpawn.GetComponent <TutorialSpawn>(); slider.maxValue = hp; fill.color = gradient.Evaluate(1f); }