public void restart() { resetTime = Time.time; win = false; lose = false; firstTouch = false; wasStable = false; foreach (GameObject fooObj in GameObject.FindGameObjectsWithTag("Stick")) { Destroy(fooObj); } Destroy(GameObject.FindGameObjectWithTag("SpecialStick")); stickCount = 10 + menuScript.level * 5; gameSetUp.SetUp(stickCount); }
void Start() { obj = GameObject.FindGameObjectWithTag("Menu"); menuScript = obj.GetComponent <MenuScript> (); level = menuScript.level; stickCount = 10 + level * 5; win = false; lose = false; firstTouch = false; wasStable = false; resetTime = 0.0f; gameSetUp = GetComponent <GameSetUp> (); Screen.orientation = ScreenOrientation.LandscapeLeft; gameSetUp.SetUp(stickCount); Social.localUser.Authenticate(success => { if (success) { Debug.Log("==iOS GC authenticate ok"); } else { Debug.Log("==iOS GC authenticate Failed"); } }); }