void Start() { Panel_Start = transform.Find("Panel_Start").gameObject; Panel_Game = transform.Find("Panel_Game").gameObject; userImage = transform.Find("UserImage").GetComponent <RawImage>(); canvasGroup = userImage.GetComponent <CanvasGroup>(); Cursor = transform.Find("Cursor").GetComponent <Image>(); mButton_NewGame = transform.Find("Panel_Start/Button_NewGame/NewGameCircle"); mButton_Dojo = transform.Find("Panel_Start/Button_Dojo/DojoCircle"); mButton_Quit = transform.Find("Panel_Start/Button_Quit/QuitCircle"); mButton_Apple = transform.Find("Panel_Start/Button_Dojo/Apple"); mButton_Strawberry = transform.Find("Panel_Start/Button_NewGame/Strawberry"); mbutton_Boom = transform.Find("Panel_Start/Button_Quit/Boom"); titleTF = transform.Find("Panel_Start/Title"); scoreCountUI = transform.Find("Panel_Game/Score/ScoreCount").GetComponent <Text>(); bestCountUI = transform.Find("Panel_Game/BestScore").GetComponent <Text>(); //gamoverCG = transform.Find("Panel_Game/GameOver").GetComponent<CanvasGroup>(); gameOver = transform.Find("Panel_Game/GameOver").gameObject; GetLifeToggles(); UpdateBestScoreUI(); //print("Hieght" + KinectManager.Instance.GetDepthImageHeight() + "width" + KinectManager.Instance.GetDepthImageWidth()); UIAnimation(mButton_Dojo); UIAnimation(mButton_NewGame); UIAnimation(mButton_Quit); Panel_Game.SetActive(false); gameOver.SetActive(false); ShowTitle(); }
public void SwitchPanel(bool toGame) { if (toGame) { Panel_Start.SetActive(false); Panel_Game.SetActive(true); } else { Panel_Start.SetActive(true); Panel_Game.SetActive(false); } }