mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 02:14:30 -05:00
Resolved many merge conflicts
This commit is contained in:
@@ -1,132 +0,0 @@
|
||||
// GENERATED AUTOMATICALLY FROM 'Assets/Scripts/PlayerScripts/MovementAbilities/GamePadControlls.inputactions'
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
public class @GamePadControlls : IInputActionCollection, IDisposable
|
||||
{
|
||||
public InputActionAsset asset { get; }
|
||||
public @GamePadControlls()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""name"": ""GamePadControlls"",
|
||||
""maps"": [
|
||||
{
|
||||
""name"": ""Runner"",
|
||||
""id"": ""5b72a223-d8e7-4904-bda9-b7bc5bf92850"",
|
||||
""actions"": [
|
||||
{
|
||||
""name"": ""Jump"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""bd111e05-cd62-4634-ac88-eb948971f528"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""9fde690f-bb27-4b3c-a7e4-4354283ff9da"",
|
||||
""path"": ""<Gamepad>/buttonSouth"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Jump"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
""controlSchemes"": []
|
||||
}");
|
||||
// Runner
|
||||
m_Runner = asset.FindActionMap("Runner", throwIfNotFound: true);
|
||||
m_Runner_Jump = m_Runner.FindAction("Jump", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Object.Destroy(asset);
|
||||
}
|
||||
|
||||
public InputBinding? bindingMask
|
||||
{
|
||||
get => asset.bindingMask;
|
||||
set => asset.bindingMask = value;
|
||||
}
|
||||
|
||||
public ReadOnlyArray<InputDevice>? devices
|
||||
{
|
||||
get => asset.devices;
|
||||
set => asset.devices = value;
|
||||
}
|
||||
|
||||
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
||||
|
||||
public bool Contains(InputAction action)
|
||||
{
|
||||
return asset.Contains(action);
|
||||
}
|
||||
|
||||
public IEnumerator<InputAction> GetEnumerator()
|
||||
{
|
||||
return asset.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
asset.Enable();
|
||||
}
|
||||
|
||||
public void Disable()
|
||||
{
|
||||
asset.Disable();
|
||||
}
|
||||
|
||||
// Runner
|
||||
private readonly InputActionMap m_Runner;
|
||||
private IRunnerActions m_RunnerActionsCallbackInterface;
|
||||
private readonly InputAction m_Runner_Jump;
|
||||
public struct RunnerActions
|
||||
{
|
||||
private @GamePadControlls m_Wrapper;
|
||||
public RunnerActions(@GamePadControlls wrapper) { m_Wrapper = wrapper; }
|
||||
public InputAction @Jump => m_Wrapper.m_Runner_Jump;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Runner; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
public bool enabled => Get().enabled;
|
||||
public static implicit operator InputActionMap(RunnerActions set) { return set.Get(); }
|
||||
public void SetCallbacks(IRunnerActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_RunnerActionsCallbackInterface != null)
|
||||
{
|
||||
@Jump.started -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
||||
@Jump.performed -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
||||
@Jump.canceled -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump;
|
||||
}
|
||||
m_Wrapper.m_RunnerActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@Jump.started += instance.OnJump;
|
||||
@Jump.performed += instance.OnJump;
|
||||
@Jump.canceled += instance.OnJump;
|
||||
}
|
||||
}
|
||||
}
|
||||
public RunnerActions @Runner => new RunnerActions(this);
|
||||
public interface IRunnerActions
|
||||
{
|
||||
void OnJump(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3698cf5288c74ad41ba892329e2fb719
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "GamePadControlls",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Runner",
|
||||
"id": "5b72a223-d8e7-4904-bda9-b7bc5bf92850",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Jump",
|
||||
"type": "Button",
|
||||
"id": "bd111e05-cd62-4634-ac88-eb948971f528",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "9fde690f-bb27-4b3c-a7e4-4354283ff9da",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": []
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3d6a5f3edd2f9d4693efbb2085dde9c
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
@@ -11,26 +11,27 @@ public class Nitro : MonoBehaviour
|
||||
private float coolDown;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start(){
|
||||
void Start()
|
||||
{
|
||||
playerStats = GetComponent<PlayerStats>();
|
||||
coolDown = 5.0f;
|
||||
//retrieves
|
||||
driver = FindObjectOfType<CoolDown>();
|
||||
}
|
||||
|
||||
//// Update is called once per frame
|
||||
//void Update(){
|
||||
// //once cooldowns are implemented, put this on one (a long one)
|
||||
// if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false){
|
||||
// playerStats.CurVel = playerStats.MaxVel;
|
||||
// StartCoroutine(startCoolDown());
|
||||
// }
|
||||
//}
|
||||
//private IEnumerator startCoolDown(){
|
||||
// Debug.Log("start corotine");
|
||||
// isOnCoolDown = true;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
//once cooldowns are implemented, put this on one (a long one)
|
||||
if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false)
|
||||
{
|
||||
playerStats.CurVel = playerStats.MaxVel;
|
||||
StartCoroutine(startCoolDown());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator startCoolDown(){
|
||||
Debug.Log("start corotine");
|
||||
isOnCoolDown = true;
|
||||
// driver.startUICooldown("Nitro");
|
||||
// yield return new WaitForSeconds(coolDown);
|
||||
// isOnCoolDown = false;
|
||||
//}
|
||||
yield return new WaitForSeconds(coolDown);
|
||||
isOnCoolDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user