Further cleaning of code in both scripts.
This commit is contained in:
		
							parent
							
								
									b0b5c09c54
								
							
						
					
					
						commit
						914f7e584b
					
				| @ -7,12 +7,6 @@ public class Mover : MonoBehaviour | ||||
|     [SerializeField] private float speed; | ||||
|     [SerializeField] private GameObject target; | ||||
| 
 | ||||
|     // Start is called before the first frame update | ||||
|     void Start() | ||||
|     { | ||||
|          | ||||
|     } | ||||
| 
 | ||||
|     // Update is called once per frame | ||||
|     void FixedUpdate() | ||||
|     { | ||||
|  | ||||
| @ -8,8 +8,6 @@ public class RollingBoulder : MonoBehaviour | ||||
|     // Float for time in seconds to wait to destroy the arrow on contact with any other gameobject that is no the player. | ||||
|     [SerializeField] private float waitToDestroy; | ||||
| 
 | ||||
|     public GameObject target; | ||||
| 
 | ||||
|     private void Start() | ||||
|     { | ||||
|         rb = GetComponent<Rigidbody>(); | ||||
| @ -37,7 +35,7 @@ public class RollingBoulder : MonoBehaviour | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             // If arrow makes contact with any other gameobject start DestroyArrow corountine. | ||||
|             // If boulder makes contact with any other gameobject start DestroyBoulder corountine. | ||||
|             StartCoroutine(DestoryBoulder()); | ||||
|         } | ||||
|     } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user