| | | 1 | | using System.Collections; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using UnityEngine; |
| | | 4 | | |
| | | 5 | | public class Bowling : MonoBehaviour |
| | | 6 | | { |
| | | 7 | | public Vector3 startPosition; |
| | | 8 | | |
| | | 9 | | // Start is called before the first frame update |
| | | 10 | | void Start() |
| | 4 | 11 | | { |
| | 4 | 12 | | startPosition = new Vector3(-0.1f, -0.18f, 0.37f); |
| | | 13 | | //startPosition = transform.position; |
| | 4 | 14 | | } |
| | | 15 | | |
| | | 16 | | // Update is called once per frame |
| | | 17 | | void Update() |
| | 7205 | 18 | | { |
| | 7209 | 19 | | if(transform.position.z > 1f) { |
| | 4 | 20 | | transform.position = startPosition; |
| | 4 | 21 | | GetComponent<Rigidbody>().velocity = Vector3.zero; |
| | 4 | 22 | | } |
| | 7205 | 23 | | } |
| | | 24 | | } |