Finalized for game jam submission

Lots of bugfixes
New tasks
This commit is contained in:
Jan Groß
2021-06-13 20:37:07 +02:00
parent a202fd5e6a
commit ee7a16dd2e
185 changed files with 46707 additions and 5900 deletions

View File

@@ -15,6 +15,9 @@ public class GameManager : MonoBehaviour
public Node previousNode;
public bool networkView = false;
public bool playerHasUSB = false;
public bool playerHasBattery = false;
private bool exiting = false;
// Start is called before the first frame update
@@ -39,12 +42,13 @@ public class GameManager : MonoBehaviour
activeCamera = vCam;
networkView = (!exiting && activeCamera == networkCamera) ? true : false;
}
// Update is called once per frame
void Update()
{
networkView = (activeCamera == networkCamera) ? true : false;
}
private void FixedUpdate()
@@ -52,7 +56,9 @@ public class GameManager : MonoBehaviour
//Leave network view with x
if (Keyboard.current.xKey.wasPressedThisFrame && networkView)
{
SetActiveCamera(networkCamera);
player.GetComponent<StarterAssets.FirstPersonController>().enabled = true;
Cursor.lockState = CursorLockMode.Locked;
SetActiveCamera(playerCamera);
activeNode.GetComponent<Node>().DisableNode();
activeNode = null;
}