server init

This commit is contained in:
ntr committed 2023-08-23 12:56:28 +10:00
1 parent 893155b53d
commit e7be495f7f
14 files changed
+213 -6

No files matched your search

+2 -4
View File
@@ -28,6 +28,8 @@ public class ShipControls : MonoBehaviour {
public PowerUnit powerUnit = new();
public float Speed => rigidBody.velocity.magnitude;
void Start() {
Cursor.lockState = CursorLockMode.Locked;
rigidBody = GetComponent<Rigidbody>();
@@ -160,10 +162,6 @@ public class ShipControls : MonoBehaviour {
timing.StartTimer();
}
public float Speed() {
return rigidBody.velocity.magnitude;
}
public void Damage(float amt, string src) {
Debug.Log($"Damage {amt} from {src}");
+1 -1
View File
@@ -93,7 +93,7 @@ public class ControlsUI : MonoBehaviour {
return;
}
speed.text = $"{ship.Speed():0}";
speed.text = $"{ship.Speed:0}";
shield.detail = ship.powerUnit.ShieldPct switch {
"100" => "",
string pct => pct,