Debug Scripts have been cleaned up.

I won't apply this cleanup to the networked version yet because they
will be updated to a state machine anyways.
This commit is contained in:
Melbyj1125
2022-02-10 21:37:19 -06:00
parent 8fbedf486d
commit 6f0b3a0d0b
25 changed files with 467 additions and 260 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 610121168135e404a920a8b2ea9aa8d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3f2cb4f0002be5f46bbd5661b5364c16
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f9ee815c205c3f44d8052ed3699439e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 971e1f1cbdebc9f49ac05494f803e05e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class MoveBaseState
{
public abstract void EnterState(MoveStateManager mSM);
public abstract void UpdateState(MoveStateManager mSM);
public abstract void FixedUpdateState(MoveStateManager mSM);
public abstract void OnCollisionEnter(MoveStateManager mSM);
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7faaa4b89293d9e4992142ab5c4fcc35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveStateManager : MonoBehaviour
{
MoveBaseState currentState;
MoveIdleState IdleState = new MoveIdleState();
MoveWalkState WalkState = new MoveWalkState();
MoveJogState JogState = new MoveJogState();
MoveRunState RunState = new MoveRunState();
// Start is called before the first frame update
void Start()
{
//players starting state
currentState = IdleState;
currentState.EnterState(this);
}
// Update is called once per frame
void Update()
{
//calls any logic in the update state from current state
currentState.UpdateState(this);
}
void FixedUpdate(){
//calls any logic in the fixed update state from current state
currentState.FixedUpdateState(this);
}
void SwitchState(MoveBaseState state){
currentState = state;
state.EnterState(this);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7adf74561e73e1c4e99ec7e3d6a08738
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e29a437006aa0374090c478aae4af886
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveIdleState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM){
}
public override void UpdateState(MoveStateManager mSM){
}
public override void FixedUpdateState(MoveStateManager mSM){
}
public override void OnCollisionEnter(MoveStateManager mSM){
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 125078d4aa4c6df499f04e79c5142b5f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveJogState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM){
}
public override void UpdateState(MoveStateManager mSM){
}
public override void FixedUpdateState(MoveStateManager mSM){
}
public override void OnCollisionEnter(MoveStateManager mSM){
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 51bfa6fd57184214195d51b209c92454
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveRunState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM){
}
public override void UpdateState(MoveStateManager mSM){
}
public override void FixedUpdateState(MoveStateManager mSM){
}
public override void OnCollisionEnter(MoveStateManager mSM){
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 022dbadfec93fcf489a6e2bab39d0553
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveWalkState : MoveBaseState
{
public override void EnterState(MoveStateManager mSM){
}
public override void UpdateState(MoveStateManager mSM){
}
public override void FixedUpdateState(MoveStateManager mSM){
}
public override void OnCollisionEnter(MoveStateManager mSM){
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 44721a52e3dd5634bbd29b627ef2886b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 49be17e5729da3e45ac2be9a69003e55
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: