imported grappling files
This commit is contained in:
78
Assets/Scripts/StateController.cs
Normal file
78
Assets/Scripts/StateController.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class StateController : MonoBehaviour {
|
||||
|
||||
// this is mostly a placeholder for making the programmer HUD work properly
|
||||
// something like this will be needed later but like with real variables
|
||||
|
||||
public bool canTrumpet = true;
|
||||
public bool canTambourine = true;
|
||||
public bool canClarinet = true;
|
||||
public bool canCymbal = true;
|
||||
|
||||
public enum PlayerStates {
|
||||
Idle,
|
||||
Running,
|
||||
Jumping,
|
||||
Falling,
|
||||
TrumpetJumping,
|
||||
TambourineThrowing,
|
||||
SpiderGrappling,
|
||||
ClarinetDiving,
|
||||
CymbalParrying,
|
||||
}
|
||||
public PlayerStates currentState = PlayerStates.Idle;
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start() {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update() {
|
||||
if (Input.GetKeyDown(KeyCode.Q)) {
|
||||
canTrumpet = !canTrumpet;
|
||||
print("Q");
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.W)) {
|
||||
canTambourine = !canTambourine;
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.E)) {
|
||||
canClarinet = !canClarinet;
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.R)) {
|
||||
canCymbal = !canCymbal;
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown("1")) {
|
||||
currentState = PlayerStates.Idle;
|
||||
}
|
||||
if (Input.GetKeyDown("2")) {
|
||||
currentState = PlayerStates.Running;
|
||||
}
|
||||
if (Input.GetKeyDown("3")) {
|
||||
currentState = PlayerStates.Jumping;
|
||||
}
|
||||
if (Input.GetKeyDown("4")) {
|
||||
currentState = PlayerStates.Falling;
|
||||
}
|
||||
if (Input.GetKeyDown("5")) {
|
||||
currentState = PlayerStates.TrumpetJumping;
|
||||
}
|
||||
if (Input.GetKeyDown("6")) {
|
||||
currentState = PlayerStates.TambourineThrowing;
|
||||
}
|
||||
if (Input.GetKeyDown("7")) {
|
||||
currentState = PlayerStates.SpiderGrappling;
|
||||
}
|
||||
if (Input.GetKeyDown("8")) {
|
||||
currentState = PlayerStates.ClarinetDiving;
|
||||
}
|
||||
if (Input.GetKeyDown("9")) {
|
||||
currentState = PlayerStates.CymbalParrying;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user