// Update is called once per frame void Update() { time += Time.deltaTime; if (Mathf.Round(time) == 2 && m1.stop == true) { story1.text = "This is bounce's friend " + "Bumpy cracks!!! , a boulder"; } if (Mathf.Round(time) == 4 && m1.stop == true) { story1.text = "Press 2 to switch to bumpy " + "cracks and 1 for bounce"; } if (Mathf.Round(time) == 5 && m1.stop == true) { f1 = GameObject.Find("rock_ball_sprite").GetComponent <fading>(); f1.fade(); m1.stop = false; } if (Mathf.Round(time) == 6) { m1.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic; story1.text = ""; } }
// Update is called once per frame void Update() { t1 = GameObject.Find("trigger1").GetComponent <trigger>(); f1 = GameObject.Find("rock_ball_sprite").GetComponent <fading>(); if (t1.b1) { gameObject.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic; // Debug.Log(gameObject.GetComponent<Rigidbody2D>().bodyType); f1.fade(); } }