summaryrefslogtreecommitdiff
path: root/ActiveRagdoll/Assets/TABG/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ActiveRagdoll/Assets/TABG/Scripts')
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs34
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs.meta11
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Input/InputHandler.cs8
3 files changed, 53 insertions, 0 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs b/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs
new file mode 100644
index 0000000..a887c48
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs
@@ -0,0 +1,34 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Rigging.Debugging
+{
+
+ [ExecuteInEditMode]
+ public class DebugCollider : MonoBehaviour
+ {
+ public MeshRenderer[] renderers;
+
+ public bool draw;
+
+ void FetchRenderers()
+ {
+ if (renderers == null || renderers.Length == 0)
+ {
+ renderers = GetComponentsInChildren<MeshRenderer>();
+ }
+ }
+
+ void Update()
+ {
+ FetchRenderers();
+
+ for (int i = 0; i < renderers.Length; ++i)
+ {
+ renderers[i].enabled = draw;
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs.meta b/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs.meta
new file mode 100644
index 0000000..cb33cfe
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Debug/DebugCollider.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ffdcfebb31e298f45909264bd508a0ea
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Input/InputHandler.cs b/ActiveRagdoll/Assets/TABG/Scripts/Input/InputHandler.cs
index f5e5ea2..da174de 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Input/InputHandler.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Input/InputHandler.cs
@@ -1,3 +1,4 @@
+using Rigging.Action;
using Rigging.Cameras;
using Rigging.Data;
using System;
@@ -19,11 +20,14 @@ namespace Rigging.Inputs
private MovementDataHandler movementData;
+ private Movement movement;
+
public bool isSpringting = false;
private void Start()
{
movementData = GetComponentInChildren<MovementDataHandler>();
+ movement = GetComponentInChildren<Movement>();
}
private void Update()
@@ -53,6 +57,10 @@ namespace Rigging.Inputs
{
lastInputDirection = inputMovementDirection;
}
+ if ((bool)movement && Input.GetKeyDown(KeyCode.Space))
+ {
+ movement.Jump();
+ }
}
}