Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Assets/Graphics/Materials/Star.mat
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
12 changes: 8 additions & 4 deletions Assets/Scripts/Game/Controllers/PlayerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ void InitRigidbody () {
}

void Update () {
if (Time.timeScale == 0) {
return;
}

HandleInput();

// Refuel jetpack
Expand Down Expand Up @@ -117,10 +121,6 @@ void HandleInput()
}

void HandleMovement () {
if (Time.timeScale == 0) {
return;
}

if (!debug_playerFrozen && Time.timeScale > 0) {
cam.transform.localEulerAngles = Vector3.right * smoothPitch;
transform.Rotate (Vector3.up * Mathf.DeltaAngle (smoothYawOld, smoothYaw), Space.Self);
Expand Down Expand Up @@ -175,6 +175,10 @@ bool IsGrounded () {
}

void FixedUpdate () {
if (Time.timeScale == 0) {
return;
}
Comment on lines +178 to +180
Copy link
Copy Markdown
Author

@Delofon Delofon Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not in original source code, and there doesn't seem to be anything that breaks up in void FixedUpdate() without it, but I placed it here anyway just for convenience.


HandleMovement();

CelestialBody[] bodies = NBodySimulation.Bodies;
Expand Down