Further cleaning of code in both scripts.

This commit is contained in:
Programmer-DField 2021-03-18 12:48:09 +00:00
parent b0b5c09c54
commit 914f7e584b
2 changed files with 1 additions and 9 deletions

View File

@ -7,12 +7,6 @@ public class Mover : MonoBehaviour
[SerializeField] private float speed; [SerializeField] private float speed;
[SerializeField] private GameObject target; [SerializeField] private GameObject target;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame // Update is called once per frame
void FixedUpdate() void FixedUpdate()
{ {

View File

@ -7,8 +7,6 @@ public class RollingBoulder : MonoBehaviour
Rigidbody rb; Rigidbody rb;
// Float for time in seconds to wait to destroy the arrow on contact with any other gameobject that is no the player. // 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; [SerializeField] private float waitToDestroy;
public GameObject target;
private void Start() private void Start()
{ {
@ -37,7 +35,7 @@ public class RollingBoulder : MonoBehaviour
} }
else 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()); StartCoroutine(DestoryBoulder());
} }
} }