void Initialization() { GameObject goTemp; try { hero = PoolReference.TableScene["hero"] as GameObject; _visibleItem = PoolReference.TableScene["BonusFlyImage"]; flyImage = GameObject.FindGameObjectWithTag("Wing"); goTemp = PoolReference.TableScene["BonusFlyText"]; if (goTemp != null) { itemTextGC = goTemp.GetComponent <Text>(); } goTemp = PoolReference.TableScene["FlyTextTask"]; if (goTemp != null) { itemTextTC = goTemp.GetComponent <Text>(); } simplePlatformContoroler = hero.GetComponent <SimplePlatformContoroler>(); _visibleItem.SetActive(false); flyImage.SetActive(false); LoadAmount(); } catch (MissingReferenceException) { MonoBehaviour.print("Initialization() - MissingReferenceException!!!!"); } }
void Start() { try { if( simplePC == null ) simplePC = PoolReference.TableScene[EnumInPool.hero.ToString()].GetComponent<SimplePlatformContoroler>(); GameCanvas = PoolReference.TableScene[EnumInPool.GameCanvas.ToString()].GetComponent<Canvas>(); TaskCanvas = PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].GetComponent<Canvas>(); } catch { } shopTextGO = shopText.gameObject; shopTextGO.SetActive( false ); }
void Start() { try { if (simplePC == null) { simplePC = PoolReference.TableScene[EnumInPool.hero.ToString()].GetComponent <SimplePlatformContoroler>(); } GameCanvas = PoolReference.TableScene[EnumInPool.GameCanvas.ToString()].GetComponent <Canvas>(); TaskCanvas = PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].GetComponent <Canvas>(); } catch { } shopTextGO = shopText.gameObject; shopTextGO.SetActive(false); }
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); }
void Initialization() { GameObject goTemp; try { hero = PoolReference.TableScene["hero"] as GameObject; _visibleItem = PoolReference.TableScene["BonusFlyImage"]; flyImage = GameObject.FindGameObjectWithTag("Wing"); goTemp = PoolReference.TableScene["BonusFlyText"]; if (goTemp != null) itemTextGC = goTemp.GetComponent<Text>(); goTemp = PoolReference.TableScene["FlyTextTask"]; if (goTemp != null) itemTextTC = goTemp.GetComponent<Text>(); simplePlatformContoroler = hero.GetComponent<SimplePlatformContoroler>(); _visibleItem.SetActive(false); flyImage.SetActive(false); LoadAmount(); } catch (MissingReferenceException) { MonoBehaviour.print("Initialization() - MissingReferenceException!!!!"); } }