Implemented arm grabby thing

This commit is contained in:
Jan Groß
2021-06-13 02:19:17 +02:00
parent a2eff81009
commit d5b997e819
18 changed files with 4288 additions and 35 deletions

View File

@@ -10,6 +10,7 @@ public class RobotArmController : MonoBehaviour
public bool isInUse = false;
public GameManager gameManager;
public Grapparoni grabber;
public CinemachineVirtualCamera localCamera;
public GameObject target;
public float armSpeed = 1;
@@ -22,6 +23,7 @@ public class RobotArmController : MonoBehaviour
void Start()
{
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
target.GetComponent<Animator>().speed = 1f;
}
private void Update()
@@ -50,6 +52,12 @@ public class RobotArmController : MonoBehaviour
gameManager.previousNode.SetActiveNode();
}
//return to network view with x
if (Keyboard.current.spaceKey.wasPressedThisFrame)
{
grabber.GrabClosest();
}
//Hoch/Runter
if (Keyboard.current.ctrlKey.isPressed && target.transform.position.y > transform.position.y)
{