Cease v0.5
This commit is contained in:
35
Assets/InputSystem.inputsettings.asset
Normal file
35
Assets/InputSystem.inputsettings.asset
Normal file
@@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
|
||||
m_Name: InputSystem.inputsettings
|
||||
m_EditorClassIdentifier:
|
||||
m_SupportedDevices: []
|
||||
m_UpdateMode: 1
|
||||
m_MaxEventBytesPerUpdate: 5242880
|
||||
m_MaxQueuedEventsPerUpdate: 1000
|
||||
m_CompensateForScreenOrientation: 1
|
||||
m_BackgroundBehavior: 0
|
||||
m_EditorInputBehaviorInPlayMode: 0
|
||||
m_DefaultDeadzoneMin: 0.125
|
||||
m_DefaultDeadzoneMax: 0.925
|
||||
m_DefaultButtonPressPoint: 0.5
|
||||
m_ButtonReleaseThreshold: 0.75
|
||||
m_DefaultTapTime: 0.2
|
||||
m_DefaultSlowTapTime: 0.5
|
||||
m_DefaultHoldTime: 0.4
|
||||
m_TapRadius: 5
|
||||
m_MultiTapDelayTime: 0.75
|
||||
m_DisableRedundantEventsMerging: 0
|
||||
m_iOSSettings:
|
||||
m_MotionUsage:
|
||||
m_Enabled: 0
|
||||
m_Description:
|
||||
8
Assets/InputSystem.inputsettings.asset.meta
Normal file
8
Assets/InputSystem.inputsettings.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75edf301e04ca6e4e8d030e37fec02e8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1001,6 +1001,7 @@ GameObject:
|
||||
- component: {fileID: 9124306867817734687}
|
||||
- component: {fileID: 6340134095258607311}
|
||||
- component: {fileID: -5973425731125482380}
|
||||
- component: {fileID: 1229072790185042031}
|
||||
m_Layer: 3
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
@@ -1092,6 +1093,15 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
Speed: 12
|
||||
RotateSpeed: 720
|
||||
playerControls:
|
||||
m_Name: Player Controls
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id: a5e4bd49-2a67-4862-9383-e234b2f42aa9
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings: []
|
||||
m_Flags: 0
|
||||
--- !u!114 &9124306867817734687
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1232,6 +1242,36 @@ AudioSource:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &1229072790185042031
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6949365541298368387}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: bbacd169367baf64ca79b6a56dad7606, type: 3}
|
||||
m_NotificationBehavior: 0
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_DeviceRegainedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ControlsChangedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionEvents: []
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Player
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!1 &7075691392410907683
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
1203
Assets/Player/PlayerControls.cs
Normal file
1203
Assets/Player/PlayerControls.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 032f3415ba7c171498cf298f0fb45c7e
|
||||
guid: 0d2697dba749b2343973955799e10a7c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
880
Assets/Player/PlayerControls.inputactions
Normal file
880
Assets/Player/PlayerControls.inputactions
Normal file
@@ -0,0 +1,880 @@
|
||||
{
|
||||
"name": "PlayerControls",
|
||||
"maps": [
|
||||
{
|
||||
"name": "Player",
|
||||
"id": "c94907a4-722d-4e5b-90c1-2a8fb2df251f",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Move",
|
||||
"type": "Value",
|
||||
"id": "007c9044-8622-4f78-942c-c7d731aaade6",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Confirm",
|
||||
"type": "Button",
|
||||
"id": "947ce93b-5110-474a-a4b3-3550785c86d9",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Escape",
|
||||
"type": "Button",
|
||||
"id": "621e515f-93cc-4661-a257-c20cad10e503",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Sprint",
|
||||
"type": "Button",
|
||||
"id": "0c5bca92-4b39-4c27-8ec9-89303977b1a3",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403",
|
||||
"path": "<Gamepad>/leftStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "WASD",
|
||||
"id": "00ca640b-d935-4593-8157-c05846ea39b3",
|
||||
"path": "Dpad",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9",
|
||||
"path": "<Keyboard>/upArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "320bffee-a40b-4347-ac70-c210eb8bc73a",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1",
|
||||
"path": "<Keyboard>/downArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "2e46982e-44cc-431b-9f0b-c11910bf467a",
|
||||
"path": "<Keyboard>/leftArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "77bff152-3580-4b21-b6de-dcd0c7e41164",
|
||||
"path": "<Keyboard>/rightArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8",
|
||||
"path": "<XRController>/{Primary2DAxis}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3ea4d645-4504-4529-b061-ab81934c3752",
|
||||
"path": "<Joystick>/stick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "PS",
|
||||
"id": "79cf9588-8d92-453b-a17e-625ec17c72bf",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "fe808b04-3556-4cd6-a237-3795c1762a7d",
|
||||
"path": "<Gamepad>/dpad/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "049ff954-bb2f-484e-91ec-b8ed71a1080f",
|
||||
"path": "<Gamepad>/dpad/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "8ce319fe-c07d-4f1e-84ac-c264f11b7779",
|
||||
"path": "<Gamepad>/dpad/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "2f158004-c3b2-4ca2-b60f-bcb838b037bb",
|
||||
"path": "<Gamepad>/dpad/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "41bccb01-4f12-4085-a11c-20ea00b2bc36",
|
||||
"path": "<Keyboard>/x",
|
||||
"interactions": "Press",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Confirm",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a84a6761-ddb2-46ce-84c7-d93b52b29e42",
|
||||
"path": "<DualShockGamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Confirm",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f6775f2c-ca3f-45c1-9bdd-80e6e80a20c7",
|
||||
"path": "<Keyboard>/escape",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Escape",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a3aabba1-e1f5-4b1a-97f6-52596f89c52e",
|
||||
"path": "<DualShockGamepad>/buttonEast",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Gamepad",
|
||||
"action": "Escape",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "1ccd7f0e-31c5-41a4-ad28-20e3aabddd96",
|
||||
"path": "<Keyboard>/shift",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Sprint",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "28f49a02-d094-435b-9666-691ebeb09a1a",
|
||||
"path": "<DualShockGamepad>/leftStickPress",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Sprint",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UI",
|
||||
"id": "3f5d1d20-3c1c-4769-86dd-870ef1728c38",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Navigate",
|
||||
"type": "PassThrough",
|
||||
"id": "2911e6d4-a31e-4f33-843f-9ad690f00233",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Submit",
|
||||
"type": "Button",
|
||||
"id": "2cda1a02-5d4e-4a5a-bae7-86221397127c",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Cancel",
|
||||
"type": "Button",
|
||||
"id": "fb5e131d-09b5-46bf-9535-845a3bb14cf1",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Point",
|
||||
"type": "PassThrough",
|
||||
"id": "723a088c-743f-4ca8-b4fb-e891a6be6c6c",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "Click",
|
||||
"type": "PassThrough",
|
||||
"id": "f1a53f7b-773e-4aef-a3a7-1c772ecbff38",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": true
|
||||
},
|
||||
{
|
||||
"name": "ScrollWheel",
|
||||
"type": "PassThrough",
|
||||
"id": "813a0821-8873-4605-96ce-a06c54d830b7",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "MiddleClick",
|
||||
"type": "PassThrough",
|
||||
"id": "b0ead1f4-600e-4d32-b4b3-5cc7c264ad4f",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "RightClick",
|
||||
"type": "PassThrough",
|
||||
"id": "4f52e971-915d-4d49-86a9-d9dde1cc4cb7",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "TrackedDevicePosition",
|
||||
"type": "PassThrough",
|
||||
"id": "1dc5be4e-eb57-41be-8ecc-0bb582d3a219",
|
||||
"expectedControlType": "Vector3",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "TrackedDeviceOrientation",
|
||||
"type": "PassThrough",
|
||||
"id": "14c0c993-c329-45ca-a4d8-c1738ad8c972",
|
||||
"expectedControlType": "Quaternion",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "Gamepad",
|
||||
"id": "809f371f-c5e2-4e7a-83a1-d867598f40dd",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf",
|
||||
"path": "<Gamepad>/leftStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "9144cbe6-05e1-4687-a6d7-24f99d23dd81",
|
||||
"path": "<Gamepad>/rightStick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "2db08d65-c5fb-421b-983f-c71163608d67",
|
||||
"path": "<Gamepad>/leftStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "58748904-2ea9-4a80-8579-b500e6a76df8",
|
||||
"path": "<Gamepad>/rightStick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "8ba04515-75aa-45de-966d-393d9bbd1c14",
|
||||
"path": "<Gamepad>/leftStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "712e721c-bdfb-4b23-a86c-a0d9fcfea921",
|
||||
"path": "<Gamepad>/rightStick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "fcd248ae-a788-4676-a12e-f4d81205600b",
|
||||
"path": "<Gamepad>/leftStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "1f04d9bc-c50b-41a1-bfcc-afb75475ec20",
|
||||
"path": "<Gamepad>/rightStick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90",
|
||||
"path": "<Gamepad>/dpad",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "Joystick",
|
||||
"id": "e25d9774-381c-4a61-b47c-7b6b299ad9f9",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "3db53b26-6601-41be-9887-63ac74e79d19",
|
||||
"path": "<Joystick>/stick/up",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f",
|
||||
"path": "<Joystick>/stick/down",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "0392d399-f6dd-4c82-8062-c1e9c0d34835",
|
||||
"path": "<Joystick>/stick/left",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc",
|
||||
"path": "<Joystick>/stick/right",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Joystick",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "Keyboard",
|
||||
"id": "ff527021-f211-4c02-933e-5976594c46ed",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Navigate",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "563fbfdd-0f09-408d-aa75-8642c4f08ef0",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "eb480147-c587-4a33-85ed-eb0ab9942c43",
|
||||
"path": "<Keyboard>/upArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "2bf42165-60bc-42ca-8072-8c13ab40239b",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac",
|
||||
"path": "<Keyboard>/downArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "74214943-c580-44e4-98eb-ad7eebe17902",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "cea9b045-a000-445b-95b8-0c171af70a3b",
|
||||
"path": "<Keyboard>/leftArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "8607c725-d935-4808-84b1-8354e29bab63",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b",
|
||||
"path": "<Keyboard>/rightArrow",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Navigate",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc",
|
||||
"path": "*/{Submit}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
|
||||
"action": "Submit",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "82627dcc-3b13-4ba9-841d-e4b746d6553e",
|
||||
"path": "*/{Cancel}",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR",
|
||||
"action": "Cancel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86",
|
||||
"path": "<Mouse>/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "e1394cbc-336e-44ce-9ea8-6007ed6193f7",
|
||||
"path": "<Pen>/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "5693e57a-238a-46ed-b5ae-e64e6e574302",
|
||||
"path": "<Touchscreen>/touch*/position",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touch",
|
||||
"action": "Point",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5",
|
||||
"path": "<Mouse>/leftButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace",
|
||||
"path": "<Pen>/tip",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "47c2a644-3ebc-4dae-a106-589b7ca75b59",
|
||||
"path": "<Touchscreen>/touch*/press",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Touch",
|
||||
"action": "Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "bb9e6b34-44bf-4381-ac63-5aa15d19f677",
|
||||
"path": "<XRController>/trigger",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "Click",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "38c99815-14ea-4617-8627-164d27641299",
|
||||
"path": "<Mouse>/scroll",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "ScrollWheel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "24066f69-da47-44f3-a07e-0015fb02eb2e",
|
||||
"path": "<Mouse>/middleButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "MiddleClick",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "4c191405-5738-4d4b-a523-c6a301dbf754",
|
||||
"path": "<Mouse>/rightButton",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "RightClick",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77",
|
||||
"path": "<XRController>/devicePosition",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "TrackedDevicePosition",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "23e01e3a-f935-4948-8d8b-9bcac77714fb",
|
||||
"path": "<XRController>/deviceRotation",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XR",
|
||||
"action": "TrackedDeviceOrientation",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": [
|
||||
{
|
||||
"name": "Keyboard&Mouse",
|
||||
"bindingGroup": "Keyboard&Mouse",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Keyboard>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<Mouse>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Gamepad",
|
||||
"bindingGroup": "Gamepad",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Gamepad>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Touch",
|
||||
"bindingGroup": "Touch",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Touchscreen>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Joystick",
|
||||
"bindingGroup": "Joystick",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Joystick>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "XR",
|
||||
"bindingGroup": "XR",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<XRController>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
14
Assets/Player/PlayerControls.inputactions.meta
Normal file
14
Assets/Player/PlayerControls.inputactions.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbacd169367baf64ca79b6a56dad7606
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Scampz.GameJam.Assets.Scripts;
|
||||
using Scampz.GameJam.Assets.Scripts.Audio;
|
||||
using Scampz.GameJam.Assets.Scripts.Utilities;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam
|
||||
{
|
||||
@@ -23,6 +23,9 @@ namespace Scampz.GameJam
|
||||
|
||||
public bool IsTalking = false;
|
||||
|
||||
private InputAction confirmAction;
|
||||
private InputAction escapeAction;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
@@ -36,12 +39,24 @@ namespace Scampz.GameJam
|
||||
|
||||
public void Start()
|
||||
{
|
||||
escapeAction = new InputAction("cancel", binding: "<Keyboard>/escape");
|
||||
escapeAction.AddBinding("<GamePad>/buttonEast");
|
||||
escapeAction.Enable();
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
sentences = new Queue<string>();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
escapeAction.Disable();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (IsTalking && Input.GetButtonDown(InputOptions.Cancel))
|
||||
if (IsTalking && escapeAction.triggered)
|
||||
EndDialogue();
|
||||
}
|
||||
|
||||
@@ -93,7 +108,7 @@ namespace Scampz.GameJam
|
||||
yield return null;
|
||||
SFXManager.Instance.StopSoundEffect();
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
yield return new WaitForKeyDown(InputOptions.Submit);
|
||||
yield return new WaitForKeyDown(confirmAction);
|
||||
SFXManager.Instance.PlaySoundEffect(SoundEffectName.Ok);
|
||||
DisplayNextSentence(dialogue);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Scampz.GameJam.Assets.Scripts;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam
|
||||
{
|
||||
@@ -10,6 +10,20 @@ namespace Scampz.GameJam
|
||||
|
||||
private bool _isWithinRange = false;
|
||||
|
||||
private InputAction confirmAction;
|
||||
|
||||
void Start()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
@@ -24,7 +38,7 @@ namespace Scampz.GameJam
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (_isWithinRange && Input.GetButtonDown(InputOptions.Submit) && !DialogueManager.Instance.IsTalking)
|
||||
if (_isWithinRange && confirmAction.triggered && !DialogueManager.Instance.IsTalking)
|
||||
{
|
||||
var player = GameObject.FindGameObjectWithTag("Player");
|
||||
var cc = player.GetComponent<CharacterController>();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Scampz.GameJam.Assets.Scripts.Player;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts
|
||||
{
|
||||
@@ -10,6 +11,28 @@ namespace Scampz.GameJam.Assets.Scripts
|
||||
public float RotateSpeed = 720.0f;
|
||||
private float _ySpeed = 0f;
|
||||
private PlayerState _playerState;
|
||||
public PlayerControls playerControls;
|
||||
private InputAction move;
|
||||
private InputAction sprint;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
playerControls = new PlayerControls();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
move = playerControls.Player.Move;
|
||||
sprint = playerControls.Player.Sprint;
|
||||
move.Enable();
|
||||
sprint.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
move.Disable();
|
||||
sprint.Disable();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -25,12 +48,10 @@ namespace Scampz.GameJam.Assets.Scripts
|
||||
void Move()
|
||||
{
|
||||
var movementSpeed = Speed;
|
||||
if (Input.GetButton(InputOptions.Sprint))
|
||||
if (sprint.IsPressed())
|
||||
movementSpeed *= 2;
|
||||
var horizontalMovement = Input.GetAxisRaw(InputOptions.Horizontal);
|
||||
var verticalMovement = Input.GetAxisRaw(InputOptions.Vertical);
|
||||
|
||||
var movementDirection = new Vector3(-horizontalMovement, 0, -verticalMovement);
|
||||
var movement = move.ReadValue<Vector2>();
|
||||
var movementDirection = new Vector3(-movement.x, 0, -movement.y);
|
||||
var magnitude = Mathf.Clamp01(movementDirection.magnitude) * movementSpeed;
|
||||
movementDirection.Normalize();
|
||||
_ySpeed += Physics.gravity.y * Time.deltaTime;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
namespace Scampz.GameJam.Assets.Scripts
|
||||
{
|
||||
public static class InputOptions
|
||||
{
|
||||
public static string Vertical => "Vertical";
|
||||
|
||||
public static string Horizontal => "Horizontal";
|
||||
|
||||
public static string Submit => "Submit";
|
||||
|
||||
public static string Cancel => "Cancel";
|
||||
|
||||
public static string Sprint => "Sprint";
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,27 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToAirshipGuy : MonoBehaviour
|
||||
{
|
||||
private InputAction confirmAction;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
if (confirmAction.triggered)
|
||||
UnlockSanctumState.Instance.TalkedToAirshipGuy = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToFrogLady : MonoBehaviour
|
||||
{
|
||||
private InputAction confirmAction;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
if (confirmAction.triggered)
|
||||
UnlockSanctumState.Instance.TalkedToFrog = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToIceGuy : MonoBehaviour
|
||||
{
|
||||
private InputAction confirmAction;
|
||||
|
||||
void Start()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
if (confirmAction.triggered)
|
||||
UnlockSanctumState.Instance.TalkedToIceGuy = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Player
|
||||
{
|
||||
public class TalkedToVoid : MonoBehaviour
|
||||
{
|
||||
private InputAction confirmAction;
|
||||
|
||||
void Start()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
UnlockSanctumState.Instance.VoidOpened = true;
|
||||
}
|
||||
if (confirmAction.triggered)
|
||||
UnlockSanctumState.Instance.VoidOpened = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Scampz.GameJam.Assets.Scripts;
|
||||
using Scampz.GameJam.Assets.Scripts.Audio;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Scampz.GameJam
|
||||
@@ -16,6 +16,20 @@ namespace Scampz.GameJam
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _promptText;
|
||||
|
||||
private InputAction confirmAction;
|
||||
|
||||
void Start()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
confirmAction.Disable();
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider collider)
|
||||
{
|
||||
if (!_loaded && collider.CompareTag("Player"))
|
||||
@@ -30,7 +44,7 @@ namespace Scampz.GameJam
|
||||
|
||||
private void OnTriggerStay(Collider collider)
|
||||
{
|
||||
if (!_loaded && collider.CompareTag("Player") && _promptText != null && _promptText.enabled && Input.GetButton(InputOptions.Submit))
|
||||
if (!_loaded && collider.CompareTag("Player") && _promptText != null && _promptText.enabled && confirmAction.IsPressed())
|
||||
LoadNextLevel();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
using Scampz.GameJam.Assets.Scripts;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Scampz.GameJam
|
||||
{
|
||||
public class TitleScreen : MonoBehaviour
|
||||
{
|
||||
private InputAction confirmAction;
|
||||
|
||||
void Start()
|
||||
{
|
||||
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
|
||||
confirmAction.AddBinding("<GamePad>/buttonSouth");
|
||||
confirmAction.Enable();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetButton(InputOptions.Submit))
|
||||
if (confirmAction.triggered)
|
||||
GameManager.Instance.LoadScene(SceneNames.WorldMap, LoadSceneMode.Single);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Scampz.GameJam.Assets.Scripts.Utilities
|
||||
{
|
||||
public class WaitForKeyDown : CustomYieldInstruction
|
||||
{
|
||||
private List<string> _inputOptions;
|
||||
private InputAction _inputAction;
|
||||
|
||||
public override bool keepWaiting => !ShouldContinue();
|
||||
|
||||
public WaitForKeyDown(params string[] inputOptions)
|
||||
public WaitForKeyDown(InputAction inputAction)
|
||||
{
|
||||
_inputOptions = inputOptions.ToList();
|
||||
_inputAction = inputAction;
|
||||
}
|
||||
|
||||
private bool ShouldContinue()
|
||||
{
|
||||
foreach (var input in _inputOptions)
|
||||
{
|
||||
if (Input.GetButtonDown(input))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return _inputAction.triggered;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +292,6 @@ RectTransform:
|
||||
- {fileID: 8787990294269674328}
|
||||
- {fileID: 2892224927131087056}
|
||||
- {fileID: 9048025182165106366}
|
||||
- {fileID: 8261970056456307927}
|
||||
- {fileID: 5230657984148141075}
|
||||
m_Father: {fileID: 3584299649024768172}
|
||||
m_RootOrder: 3
|
||||
@@ -383,74 +382,6 @@ Animator:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &3027751379730255851
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8261970056456307927}
|
||||
- component: {fileID: 1741723130925857036}
|
||||
- component: {fileID: 1314157284691256634}
|
||||
m_Layer: 5
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8261970056456307927
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3027751379730255851}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4605870207825934367}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1741723130925857036
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3027751379730255851}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!114 &1314157284691256634
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3027751379730255851}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!1 &3584299648992395873
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1129,7 +1060,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4605870207825934367}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
|
||||
Reference in New Issue
Block a user