Project
This commit is contained in:
1 parent
e1a474d4ac
commit
24b1157026
164 files changed
+68527
No files matched your search
@@ -0,0 +1,16 @@
|
||||
using Code.GameplayServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.PassingObjects
|
||||
{
|
||||
public class PassingObject : MonoBehaviour
|
||||
{
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (transform.position.z < PassingObjectsManager.Instance.BehindPlayerThreshold)
|
||||
PassingObjectsManager.Instance.KillChild(this);
|
||||
|
||||
transform.position -= new Vector3(0, 0, GameplayManager.Instance.GameSpeed * Time.fixedDeltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user