Made respawn when hit centre

This commit is contained in:
Pasha Bibko
2025-11-20 14:21:46 +00:00
parent 19b2c06fab
commit 88fa7e4ff3
3 changed files with 42 additions and 6 deletions

View File

@@ -7,12 +7,12 @@ public class PlayerController : OrbitalPositionBehaviour
GlobalOrbitalPositionManager.SetPlayer(m_OrbitalPosition);
m_OrbitalPosition.m_ObjectRadius = 0.4f;
m_OrbitalPosition.m_SpinSpeed = 0.05f;
m_OrbitalPosition.m_SpinSpeed = 0.1f;
}
public void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
if (Input.GetKeyDown(KeyCode.Space) && GlobalOrbitalPositionManager.AllowPlayerInput)
{
m_OrbitalPosition.m_AttachedRing += 1;
}
@@ -22,4 +22,9 @@ public class PlayerController : OrbitalPositionBehaviour
{
Debug.Log("HIT OBSTACLE IG");
}
public override void OnReachCentre()
{
GlobalOrbitalPositionManager.RestartSimulation();
}
}