Skip to content

Commit

Permalink
Updated Input System to 1.0.0-preview.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSiriusSystem committed Nov 9, 2019
1 parent 9a1ed37 commit 691ac68
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 186 deletions.
20 changes: 10 additions & 10 deletions Defend the Earth (Mobile)/Assets/Scripts/Player/Controls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;

public class Controls : IInputActionCollection, IDisposable
public class @Controls : IInputActionCollection, IDisposable
{
private InputActionAsset asset;
public Controls()
public @Controls()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""Controls"",
Expand Down Expand Up @@ -133,8 +133,8 @@ public void Disable()
private readonly InputAction m_Gameplay_Press;
public struct GameplayActions
{
private Controls m_Wrapper;
public GameplayActions(Controls wrapper) { m_Wrapper = wrapper; }
private @Controls m_Wrapper;
public GameplayActions(@Controls wrapper) { m_Wrapper = wrapper; }
public InputAction @Press => m_Wrapper.m_Gameplay_Press;
public InputActionMap Get() { return m_Wrapper.m_Gameplay; }
public void Enable() { Get().Enable(); }
Expand All @@ -145,16 +145,16 @@ public void SetCallbacks(IGameplayActions instance)
{
if (m_Wrapper.m_GameplayActionsCallbackInterface != null)
{
Press.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
Press.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
Press.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
@Press.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
@Press.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
@Press.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPress;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)
{
Press.started += instance.OnPress;
Press.performed += instance.OnPress;
Press.canceled += instance.OnPress;
@Press.started += instance.OnPress;
@Press.performed += instance.OnPress;
@Press.canceled += instance.OnPress;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Defend the Earth (Mobile)/Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"com.unity.2d.sprite": "1.0.0",
"com.unity.analytics": "3.3.2",
"com.unity.ide.vscode": "1.1.3",
"com.unity.inputsystem": "1.0.0-preview.1",
"com.unity.inputsystem": "1.0.0-preview.2",
"com.unity.mobile.android-logcat": "1.0.0",
"com.unity.package-manager-ui": "2.2.0",
"com.unity.purchasing": "2.0.6",
Expand Down
Loading

0 comments on commit 691ac68

Please sign in to comment.