/// <summary> /// DO NOT USE LIGHTLY!!! WARNING!!! Clears literally all gamestate data. /// </summary> public void Clear() { if (WorldMap != null) { WorldMap.UnloadContent(); WorldMap = null; } playerStats = null; EnteringDungeon = EnteringVillage = EnteringWorld = false; PlayerExists = false; DungeonName = null; WorldMapLocation = Vector2.Zero; }
void Awake() { AnswerCeloeInputField = GameObject.Find( "CeloeInputField" ).GetComponent<InputField>(); AnswerChislitelInputField = GameObject.Find( "ChislitelInputField" ).GetComponent<InputField>(); AnswerZnamenatelInputField = GameObject.Find( "ZnamenatelInputField" ).GetComponent<InputField>(); SrollRect = GameObject.Find( "SrollRect" ).GetComponent<Image>(); rectTransform = GameObject.FindGameObjectWithTag( "Player" ).GetComponent<RectTransform>(); shop = GameObject.Find( "Shop (1)" ).GetComponent<Shop>(); ShopText = GameObject.Find( "ShopText" ).GetComponent<Text>(); simplePlatformContoroler = GameObject.FindGameObjectWithTag( "Player" ).GetComponent<SimplePlatformContoroler>(); loadStats = GameObject.Find( "DeathLine" ).GetComponent<LoadStats>(); bonusControler = GameObject.Find( "BonusControler" ).GetComponent<BonusControler>(); coinText = GameObject.Find( "CoinText" ).GetComponent<Text>(); BonusFlyText = GameObject.Find( "BonusFlyText" ).GetComponent<Text>(); FlyTextTask = GameObject.Find( "FlyTextTask" ).GetComponent<Text>(); FlyImageTask = GameObject.Find( "FlyImageTask" ).GetComponent<Image>(); PriceImageTask = GameObject.Find( "PriceImageTask" ).GetComponent<Image>(); BonusTextTask = GameObject.Find( "BonusTextTask" ).GetComponent<Text>(); BonusImageTask = GameObject.Find( "BonusImageTask" ).GetComponent<Image>(); AnswerInputField = GameObject.Find( "AnswerInputField" ).GetComponent<InputField>(); //TaskCanvas = GameObject.Find( "TaskCanvas" ).GetComponent<Canvas>(); TaskNumber = GameObject.Find( "TaskNumber" ).GetComponent<Text>(); taskHeaderText = GameObject.Find( "TaskHeader" ).GetComponent<Text>(); taskText = GameObject.Find( "TaskText" ).GetComponent<Text>(); taskImage = GameObject.Find( "TaskImage" ).GetComponent<Image>(); newButton = GameObject.Find( "NewTaskButton" ).GetComponent<Button>(); AnswerButton = GameObject.Find( "AnswerTaskButton" ).GetComponent<Button>(); exitButton = GameObject.Find( "ExitTaskButton" ).GetComponent<Button>(); BackButton = GameObject.Find( "BackButton" ).GetComponent<Button>(); taskManeger = GameObject.FindGameObjectWithTag( "TaskCanvas" ).GetComponent<TaskManeger>(); //previoustButton = GameObject.Find ("PreviousTaskButton").GetComponent<Button>(); //Invoke("showPool", 2); }
void Awake() { AnswerCeloeInputField = GameObject.Find("CeloeInputField").GetComponent <InputField>(); AnswerChislitelInputField = GameObject.Find("ChislitelInputField").GetComponent <InputField>(); AnswerZnamenatelInputField = GameObject.Find("ZnamenatelInputField").GetComponent <InputField>(); SrollRect = GameObject.Find("SrollRect").GetComponent <Image>(); rectTransform = GameObject.FindGameObjectWithTag("Player").GetComponent <RectTransform>(); shop = GameObject.Find("Shop (1)").GetComponent <Shop>(); ShopText = GameObject.Find("ShopText").GetComponent <Text>(); simplePlatformContoroler = GameObject.FindGameObjectWithTag("Player").GetComponent <SimplePlatformContoroler>(); loadStats = GameObject.Find("DeathLine").GetComponent <LoadStats>(); bonusControler = GameObject.Find("BonusControler").GetComponent <BonusControler>(); coinText = GameObject.Find("CoinText").GetComponent <Text>(); BonusFlyText = GameObject.Find("BonusFlyText").GetComponent <Text>(); FlyTextTask = GameObject.Find("FlyTextTask").GetComponent <Text>(); FlyImageTask = GameObject.Find("FlyImageTask").GetComponent <Image>(); PriceImageTask = GameObject.Find("PriceImageTask").GetComponent <Image>(); BonusTextTask = GameObject.Find("BonusTextTask").GetComponent <Text>(); BonusImageTask = GameObject.Find("BonusImageTask").GetComponent <Image>(); AnswerInputField = GameObject.Find("AnswerInputField").GetComponent <InputField>(); //TaskCanvas = GameObject.Find( "TaskCanvas" ).GetComponent<Canvas>(); TaskNumber = GameObject.Find("TaskNumber").GetComponent <Text>(); taskHeaderText = GameObject.Find("TaskHeader").GetComponent <Text>(); taskText = GameObject.Find("TaskText").GetComponent <Text>(); taskImage = GameObject.Find("TaskImage").GetComponent <Image>(); newButton = GameObject.Find("NewTaskButton").GetComponent <Button>(); AnswerButton = GameObject.Find("AnswerTaskButton").GetComponent <Button>(); exitButton = GameObject.Find("ExitTaskButton").GetComponent <Button>(); BackButton = GameObject.Find("BackButton").GetComponent <Button>(); taskManeger = GameObject.FindGameObjectWithTag("TaskCanvas").GetComponent <TaskManeger>(); //previoustButton = GameObject.Find ("PreviousTaskButton").GetComponent<Button>(); //Invoke("showPool", 2); }
public void UpdatePlayerStats(LoadStats New) { playerStats = New; }