Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start()
- {
- ballbody = GetComponent<Rigidbody>();
- roll_default = GetComponent<AudioSource>();
- while(true)
- {
- while (!Input.GetKeyDown(KeyCode.Space)) yield;
- ballbody.AddForce(0f,50.0f,0f);
- yield return new WaitForSeconds(5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement