Skip to content

Commit

Permalink
move InputDetector to RovSim.Rov namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannm committed Dec 28, 2022
1 parent 6d87b8b commit 7ab31e0
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 20 deletions.
8 changes: 0 additions & 8 deletions Assets/Scripts/Input.meta

This file was deleted.

2 changes: 1 addition & 1 deletion Assets/Scripts/Menu/PauseMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class PauseMenu : MonoBehaviour
// Update is called once per frame
private void Update()
{
if (UnityEngine.Input.GetKeyDown(KeyCode.Escape))
if (Input.GetKeyDown(KeyCode.Escape))
{
if (_gameIsPaused)
{
Expand Down
5 changes: 0 additions & 5 deletions Assets/Scripts/Rov/CameraControl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using UnityEngine;
using RovSim.Input;

namespace RovSim.Rov
{
Expand Down Expand Up @@ -29,14 +28,10 @@ public class CameraControl : MonoBehaviour
[SerializeField]
private float maxAngle = 45;

private Camera _camera;
//private Rigidbody _body;
private InputDetector _inputDetector;

private void Awake()
{
_camera = GetComponent<Camera>();
//_body = GetComponent<Rigidbody>();
_inputDetector = GetComponent<InputDetector>();
}

Expand Down
5 changes: 2 additions & 3 deletions Assets/Scripts/Rov/Grabber.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using UnityEngine;
using RovSim.Input;

namespace RovSim.Rov
{
Expand All @@ -22,10 +21,10 @@ private void Start()
// Update is called once per frame
private void Update()
{
grab();
Grab();
}

private void grab()
private void Grab()
{
if (_inputDetector.ClosePressed)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.InputSystem;

namespace RovSim.Input
namespace RovSim.Rov
{
public class InputDetector : MonoBehaviour
{
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion Assets/Scripts/Rov/Movement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using UnityEngine;
using RovSim.Input;

namespace RovSim.Rov
{
Expand Down
1 change: 0 additions & 1 deletion Assets/Scripts/Rov/Pickup.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using UnityEngine;
using RovSim.Input;

namespace RovSim.Rov
{
Expand Down

0 comments on commit 7ab31e0

Please sign in to comment.