Added Node camera transitions
Fixed Conveyor speedup issue
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
@@ -8,18 +9,20 @@ public class GameManager : MonoBehaviour
|
||||
public GameObject player;
|
||||
public Camera[] cameras;
|
||||
public GameObject networkCamera;
|
||||
|
||||
public GameObject activeNode;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void SetActiveCamera(int cam)
|
||||
{
|
||||
for (int i = 0; i < cameras.Length; i++)
|
||||
{
|
||||
if (i==cam) {
|
||||
if (i == cam)
|
||||
{
|
||||
|
||||
}
|
||||
cameras[i].enabled = (i == cam);
|
||||
@@ -29,6 +32,17 @@ public class GameManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
|
||||
if (Keyboard.current.xKey.wasPressedThisFrame)
|
||||
{
|
||||
SetActiveCamera(0);
|
||||
activeNode.GetComponent<Node>().DisableNode();
|
||||
activeNode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user