exit app using escape
This commit is contained in:
parent
ac508ccdad
commit
9f479e86a7
7 changed files with 70 additions and 6 deletions
|
|
@ -201,6 +201,14 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
""expectedControlType"": ""Button"",
|
""expectedControlType"": ""Button"",
|
||||||
""processors"": """",
|
""processors"": """",
|
||||||
""interactions"": """"
|
""interactions"": """"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""ExitGame"",
|
||||||
|
""type"": ""Button"",
|
||||||
|
""id"": ""57948248-2c31-479b-a019-a542ee8d719f"",
|
||||||
|
""expectedControlType"": ""Button"",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
""bindings"": [
|
""bindings"": [
|
||||||
|
|
@ -324,6 +332,17 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
""action"": ""InteractAlt"",
|
""action"": ""InteractAlt"",
|
||||||
""isComposite"": false,
|
""isComposite"": false,
|
||||||
""isPartOfComposite"": false
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""b53fd03a-58d9-460b-8ec9-ea527d8ff73a"",
|
||||||
|
""path"": ""<Keyboard>/escape"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": """",
|
||||||
|
""action"": ""ExitGame"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -509,6 +528,7 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
m_DobberControls_InteractAlt = m_DobberControls.FindAction("InteractAlt", throwIfNotFound: true);
|
m_DobberControls_InteractAlt = m_DobberControls.FindAction("InteractAlt", throwIfNotFound: true);
|
||||||
m_DobberControls_Attack = m_DobberControls.FindAction("Attack", throwIfNotFound: true);
|
m_DobberControls_Attack = m_DobberControls.FindAction("Attack", throwIfNotFound: true);
|
||||||
m_DobberControls_ArmTrap = m_DobberControls.FindAction("ArmTrap", throwIfNotFound: true);
|
m_DobberControls_ArmTrap = m_DobberControls.FindAction("ArmTrap", throwIfNotFound: true);
|
||||||
|
m_DobberControls_ExitGame = m_DobberControls.FindAction("ExitGame", throwIfNotFound: true);
|
||||||
// RobberControls
|
// RobberControls
|
||||||
m_RobberControls = asset.FindActionMap("RobberControls", throwIfNotFound: true);
|
m_RobberControls = asset.FindActionMap("RobberControls", throwIfNotFound: true);
|
||||||
m_RobberControls_Walk = m_RobberControls.FindAction("Walk", throwIfNotFound: true);
|
m_RobberControls_Walk = m_RobberControls.FindAction("Walk", throwIfNotFound: true);
|
||||||
|
|
@ -629,6 +649,7 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
private readonly InputAction m_DobberControls_InteractAlt;
|
private readonly InputAction m_DobberControls_InteractAlt;
|
||||||
private readonly InputAction m_DobberControls_Attack;
|
private readonly InputAction m_DobberControls_Attack;
|
||||||
private readonly InputAction m_DobberControls_ArmTrap;
|
private readonly InputAction m_DobberControls_ArmTrap;
|
||||||
|
private readonly InputAction m_DobberControls_ExitGame;
|
||||||
public struct DobberControlsActions
|
public struct DobberControlsActions
|
||||||
{
|
{
|
||||||
private @PlayerControls m_Wrapper;
|
private @PlayerControls m_Wrapper;
|
||||||
|
|
@ -640,6 +661,7 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
public InputAction @InteractAlt => m_Wrapper.m_DobberControls_InteractAlt;
|
public InputAction @InteractAlt => m_Wrapper.m_DobberControls_InteractAlt;
|
||||||
public InputAction @Attack => m_Wrapper.m_DobberControls_Attack;
|
public InputAction @Attack => m_Wrapper.m_DobberControls_Attack;
|
||||||
public InputAction @ArmTrap => m_Wrapper.m_DobberControls_ArmTrap;
|
public InputAction @ArmTrap => m_Wrapper.m_DobberControls_ArmTrap;
|
||||||
|
public InputAction @ExitGame => m_Wrapper.m_DobberControls_ExitGame;
|
||||||
public InputActionMap Get() { return m_Wrapper.m_DobberControls; }
|
public InputActionMap Get() { return m_Wrapper.m_DobberControls; }
|
||||||
public void Enable() { Get().Enable(); }
|
public void Enable() { Get().Enable(); }
|
||||||
public void Disable() { Get().Disable(); }
|
public void Disable() { Get().Disable(); }
|
||||||
|
|
@ -670,6 +692,9 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
@ArmTrap.started -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
@ArmTrap.started -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
||||||
@ArmTrap.performed -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
@ArmTrap.performed -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
||||||
@ArmTrap.canceled -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
@ArmTrap.canceled -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnArmTrap;
|
||||||
|
@ExitGame.started -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnExitGame;
|
||||||
|
@ExitGame.performed -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnExitGame;
|
||||||
|
@ExitGame.canceled -= m_Wrapper.m_DobberControlsActionsCallbackInterface.OnExitGame;
|
||||||
}
|
}
|
||||||
m_Wrapper.m_DobberControlsActionsCallbackInterface = instance;
|
m_Wrapper.m_DobberControlsActionsCallbackInterface = instance;
|
||||||
if (instance != null)
|
if (instance != null)
|
||||||
|
|
@ -695,6 +720,9 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
@ArmTrap.started += instance.OnArmTrap;
|
@ArmTrap.started += instance.OnArmTrap;
|
||||||
@ArmTrap.performed += instance.OnArmTrap;
|
@ArmTrap.performed += instance.OnArmTrap;
|
||||||
@ArmTrap.canceled += instance.OnArmTrap;
|
@ArmTrap.canceled += instance.OnArmTrap;
|
||||||
|
@ExitGame.started += instance.OnExitGame;
|
||||||
|
@ExitGame.performed += instance.OnExitGame;
|
||||||
|
@ExitGame.canceled += instance.OnExitGame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -789,6 +817,7 @@ public class @PlayerControls : IInputActionCollection, IDisposable
|
||||||
void OnInteractAlt(InputAction.CallbackContext context);
|
void OnInteractAlt(InputAction.CallbackContext context);
|
||||||
void OnAttack(InputAction.CallbackContext context);
|
void OnAttack(InputAction.CallbackContext context);
|
||||||
void OnArmTrap(InputAction.CallbackContext context);
|
void OnArmTrap(InputAction.CallbackContext context);
|
||||||
|
void OnExitGame(InputAction.CallbackContext context);
|
||||||
}
|
}
|
||||||
public interface IRobberControlsActions
|
public interface IRobberControlsActions
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,14 @@
|
||||||
"expectedControlType": "Button",
|
"expectedControlType": "Button",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"interactions": ""
|
"interactions": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ExitGame",
|
||||||
|
"type": "Button",
|
||||||
|
"id": "57948248-2c31-479b-a019-a542ee8d719f",
|
||||||
|
"expectedControlType": "Button",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bindings": [
|
"bindings": [
|
||||||
|
|
@ -311,6 +319,17 @@
|
||||||
"action": "InteractAlt",
|
"action": "InteractAlt",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "b53fd03a-58d9-460b-8ec9-ea527d8ff73a",
|
||||||
|
"path": "<Keyboard>/escape",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "ExitGame",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,12 @@ PluginImporter:
|
||||||
enabled: 1
|
enabled: 1
|
||||||
settings:
|
settings:
|
||||||
CPU: x86_64
|
CPU: x86_64
|
||||||
|
DefaultValueInitialized: true
|
||||||
OS: Windows
|
OS: Windows
|
||||||
- first:
|
- first:
|
||||||
Standalone: Win64
|
Standalone: Win64
|
||||||
second:
|
second:
|
||||||
enabled: 1
|
enabled: 0
|
||||||
settings: {}
|
settings: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ public class Dobber : MonoBehaviour
|
||||||
{
|
{
|
||||||
#region calls to other voids
|
#region calls to other voids
|
||||||
Inputs();
|
Inputs();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
inputReferences.playerControls.DobberControls.ExitGame.performed += ctx => { Application.Quit(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
//this void assignes values to input virables
|
//this void assignes values to input virables
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,11 @@
|
||||||
"key": "editor.autoRecalculateCollisions",
|
"key": "editor.autoRecalculateCollisions",
|
||||||
"value": "{\"m_Value\":false}"
|
"value": "{\"m_Value\":false}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "editor.stripProBuilderScriptsOnBuild",
|
||||||
|
"value": "{\"m_Value\":true}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "editor.rectSelectModifier",
|
"key": "editor.rectSelectModifier",
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ PlayerSettings:
|
||||||
m_SplashScreenLogos: []
|
m_SplashScreenLogos: []
|
||||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||||
defaultScreenWidth: 1024
|
defaultScreenWidth: 1280
|
||||||
defaultScreenHeight: 768
|
defaultScreenHeight: 720
|
||||||
defaultScreenWidthWeb: 960
|
defaultScreenWidthWeb: 960
|
||||||
defaultScreenHeightWeb: 600
|
defaultScreenHeightWeb: 600
|
||||||
m_StereoRenderingPath: 0
|
m_StereoRenderingPath: 0
|
||||||
|
|
@ -127,7 +127,7 @@ PlayerSettings:
|
||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 0.1
|
bundleVersion: test
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 11400000, guid: ad76045632be0b24da9b262655368913, type: 2}
|
- {fileID: 11400000, guid: ad76045632be0b24da9b262655368913, type: 2}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
[LOG] OutputWASAPI::init : Output buffer size: 4096 samples, latency: 0.00ms, period: 10.00ms, DSP buffer: 1024 * 4
|
[LOG] OutputWASAPI::init : Output buffer size: 4096 samples, latency: 0.00ms, period: 10.00ms, DSP buffer: 1024 * 4
|
||||||
[LOG] Thread::initThread : Init FMOD stream thread. Affinity: 0x8000000000000003, Priority: 0xFFFF7FFB, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
|
[LOG] Thread::initThread : Init FMOD stream thread. Affinity: 0x8000000000000003, Priority: 0xFFFF7FFB, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
|
||||||
[LOG] Thread::initThread : Init FMOD mixer thread. Affinity: 0x8000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: No, Sleep Time: 0, Looping: Yes.
|
[LOG] Thread::initThread : Init FMOD mixer thread. Affinity: 0x8000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: No, Sleep Time: 0, Looping: Yes.
|
||||||
[LOG] AsyncManager::init : manager 000001D51720A658 isAsync 0 updatePeriod 0.02
|
[LOG] AsyncManager::init : manager 00000273ED9BC8F8 isAsync 0 updatePeriod 0.02
|
||||||
[LOG] AsyncManager::init : done
|
[LOG] AsyncManager::init : done
|
||||||
[LOG] PlaybackSystem::init :
|
[LOG] PlaybackSystem::init :
|
||||||
[LOG] Thread::initThread : Init FMOD Studio sample load thread. Affinity: 0x8000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
|
[LOG] Thread::initThread : Init FMOD Studio sample load thread. Affinity: 0x8000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
|
||||||
|
|
@ -18,3 +18,11 @@
|
||||||
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
|
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] Manager::readBank : fileversion = 135, compatVersion = 132 (oldest = 44, newest = 135)
|
||||||
|
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue