Reworked camera logic

Added robot arm camera
Added robot arm idle animation
This commit is contained in:
Jan Groß
2021-06-12 21:35:11 +02:00
parent 02ca5fa574
commit 34b7152138
18 changed files with 1114 additions and 102 deletions

View File

@@ -28,6 +28,7 @@ public class Node : MonoBehaviour
if (isActive) { return; }
Debug.Log(string.Format("{0} became active node", gameObject.name));
UI.SetActive(true);
gameManager.previousNode = gameManager.activeNode.GetComponent<Node>();
gameManager.activeNode = this.gameObject;
gameManager.networkCamera.GetComponent<NetworkCamera>().targetPosition = new Vector3(transform.position.x, gameManager.networkCamera.transform.position.y, transform.position.z);
isActive = true;
@@ -48,7 +49,8 @@ public class Node : MonoBehaviour
DisableNode();
} else
{
connections[(int)dir].SendMessage("InteractNode");
connections[(int)dir].SendMessage("InteractNode", this);
gameManager.previousNode = this;
}

View File

@@ -32,7 +32,9 @@ public class Switch : MonoBehaviour
//Debug.Log("Switch is visible and in range");
if (Keyboard.current.eKey.wasPressedThisFrame && !gameManager.activeNode)
{
gameManager.SetActiveCamera(1);
gameManager.previousNode = debugNode;
gameManager.activeNode = debugNode.gameObject;
gameManager.SetActiveCamera(gameManager.networkCamera);
debugNode.SendMessage("SetActiveNode", debugNode.GetComponent<Node>());
}
}