made environment for BensonV4
This commit is contained in:
@@ -5,4 +5,20 @@ using UnityEngine;
|
||||
public class Checkpoint : MonoBehaviour
|
||||
{
|
||||
public bool isCollected = false;
|
||||
MeshRenderer meshRenderer;
|
||||
|
||||
private void Start() {
|
||||
meshRenderer = GetComponent<MeshRenderer>();
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
if (isCollected)
|
||||
{
|
||||
meshRenderer.enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
meshRenderer.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user