From 7e657bc5d4666f5fc5a39c0400fa12b2647580dd Mon Sep 17 00:00:00 2001 From: Atlas Cove Date: Thu, 6 Feb 2020 17:00:19 +0000 Subject: [PATCH] Implemented a movement controller. --- Assets/Attribution.asset.meta | 2 + Assets/InputSystem.inputsettings.asset | 26 + Assets/InputSystem.inputsettings.asset.meta | 8 + Assets/PlayerInput.preset | 91 ++ Assets/PlayerInput.preset.meta | 10 + Assets/Scenes/SampleScene.unity | 201 +++-- Assets/graphic/icosahedron.fbx.meta | 3 + Assets/graphic/player.svg | 5 + Assets/{prefab => graphic}/player.svg.meta | 3 + Assets/prefab/player.svg | 9 - Assets/prefab/playerSprite.prefab | 242 ++++++ Assets/prefab/playerSprite.prefab.meta | 7 + Assets/script/movement.meta | 8 + Assets/script/movement/Bullet.cs | 19 + Assets/script/movement/Bullet.cs.meta | 11 + Assets/script/movement/PlayerController.cs | 38 + .../script/movement/PlayerController.cs.meta | 13 + Assets/technix.inputactions | 781 ++++++++++++++++++ Assets/technix.inputactions.meta | 14 + Packages/manifest.json | 1 + ProjectSettings/EditorBuildSettings.asset | 4 +- ProjectSettings/Physics2DSettings.asset | Bin 4448 -> 2028 bytes ProjectSettings/ProjectSettings.asset | 4 +- ProjectSettings/QualitySettings.asset | 70 +- ProjectSettings/UnityConnectSettings.asset | 2 +- 25 files changed, 1453 insertions(+), 119 deletions(-) create mode 100644 Assets/InputSystem.inputsettings.asset create mode 100644 Assets/InputSystem.inputsettings.asset.meta create mode 100644 Assets/PlayerInput.preset create mode 100644 Assets/PlayerInput.preset.meta create mode 100644 Assets/graphic/player.svg rename Assets/{prefab => graphic}/player.svg.meta (98%) delete mode 100644 Assets/prefab/player.svg create mode 100644 Assets/prefab/playerSprite.prefab create mode 100644 Assets/prefab/playerSprite.prefab.meta create mode 100644 Assets/script/movement.meta create mode 100644 Assets/script/movement/Bullet.cs create mode 100644 Assets/script/movement/Bullet.cs.meta create mode 100644 Assets/script/movement/PlayerController.cs create mode 100644 Assets/script/movement/PlayerController.cs.meta create mode 100644 Assets/technix.inputactions create mode 100644 Assets/technix.inputactions.meta diff --git a/Assets/Attribution.asset.meta b/Assets/Attribution.asset.meta index 90a60e0..060c102 100644 --- a/Assets/Attribution.asset.meta +++ b/Assets/Attribution.asset.meta @@ -1,5 +1,7 @@ fileFormatVersion: 2 guid: b153e54c8f3c7c14fac9239596c4298a +labels: +- Editor NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/InputSystem.inputsettings.asset b/Assets/InputSystem.inputsettings.asset new file mode 100644 index 0000000..1b236ef --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset @@ -0,0 +1,26 @@ +%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_CompensateForScreenOrientation: 1 + m_FilterNoiseOnCurrent: 0 + m_DefaultDeadzoneMin: 0.125 + m_DefaultDeadzoneMax: 0.925 + m_DefaultButtonPressPoint: 0.5 + m_DefaultTapTime: 0.2 + m_DefaultSlowTapTime: 0.5 + m_DefaultHoldTime: 0.4 + m_TapRadius: 5 + m_MultiTapDelayTime: 0.75 diff --git a/Assets/InputSystem.inputsettings.asset.meta b/Assets/InputSystem.inputsettings.asset.meta new file mode 100644 index 0000000..4bc03a8 --- /dev/null +++ b/Assets/InputSystem.inputsettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbddc30c1394e1940b4139bd942ae09f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayerInput.preset b/Assets/PlayerInput.preset new file mode 100644 index 0000000..530601a --- /dev/null +++ b/Assets/PlayerInput.preset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PlayerInput + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_Actions + value: + objectReference: {fileID: -944628639613478452, guid: f91350d5319977b42872fee38c8debda, + type: 3} + - target: {fileID: 0} + propertyPath: m_NotificationBehavior + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_UIInputModule + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DeviceLostEvent.m_PersistentCalls.m_Calls.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DeviceLostEvent.m_TypeName + value: UnityEngine.InputSystem.PlayerInput+DeviceLostEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DeviceRegainedEvent.m_PersistentCalls.m_Calls.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DeviceRegainedEvent.m_TypeName + value: UnityEngine.InputSystem.PlayerInput+DeviceRegainedEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_ControlsChangedEvent.m_PersistentCalls.m_Calls.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_ControlsChangedEvent.m_TypeName + value: UnityEngine.InputSystem.PlayerInput+ControlsChangedEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_ActionEvents.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_NeverAutoSwitchControlSchemes + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DefaultControlScheme + value: Keyboard&Mouse + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_DefaultActionMap + value: Player + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_SplitScreenIndex + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_Camera + value: + objectReference: {fileID: 0} diff --git a/Assets/PlayerInput.preset.meta b/Assets/PlayerInput.preset.meta new file mode 100644 index 0000000..a15bfb9 --- /dev/null +++ b/Assets/PlayerInput.preset.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8db65e6f30cb7b842b33ac18d706df7f +labels: +- Player +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2655988077585873504 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 4b04bfb..318be6c 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -131,6 +131,7 @@ GameObject: - component: {fileID: 519420032} - component: {fileID: 519420031} - component: {fileID: 519420029} + - component: {fileID: 519420030} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -146,6 +147,102 @@ AudioListener: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519420028} m_Enabled: 1 +--- !u!82 &519420030 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 519420028} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!20 &519420031 Camera: m_ObjectHideFlags: 0 @@ -173,7 +270,7 @@ Camera: far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 5 + orthographic size: 3.846261 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -203,143 +300,77 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1359098982 +--- !u!1001 &902015224705780105 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: -243641335168648300, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802321990, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_Name value: player objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_RootOrder value: 1 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 902015223802322008, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, + - target: {fileID: 7666999436434910021, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} - propertyPath: m_LocalScale.x - value: 0.20622 - objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, - type: 3} - propertyPath: m_LocalScale.y - value: 0.20622 - objectReference: {fileID: 0} - - target: {fileID: -4162175415842178919, guid: 7b67dca947db1b646a7d717291a09451, - type: 3} - propertyPath: m_LocalScale.z - value: 0.20622 - objectReference: {fileID: 0} + propertyPath: m_Camera + value: + objectReference: {fileID: 519420031} m_RemovedComponents: [] - m_SourcePrefab: {fileID: 7243324766535440047, guid: 7b67dca947db1b646a7d717291a09451, - type: 3} ---- !u!1 &1359098983 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: -243641335168648300, guid: 7b67dca947db1b646a7d717291a09451, - type: 3} - m_PrefabInstance: {fileID: 1359098982} - m_PrefabAsset: {fileID: 0} ---- !u!50 &1359098984 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359098983} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 4 ---- !u!60 &1359098985 -PolygonCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359098983} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_SpriteTilingProperty: - border: {x: 0, y: 0, z: 0, w: 0} - pivot: {x: 0.5, y: 0.5} - oldSize: {x: 3.0330002, y: 3.9011} - newSize: {x: 3.0330002, y: 3.9011} - adaptiveTilingThreshold: 0.5 - drawMode: 0 - adaptiveTiling: 0 - m_AutoTiling: 0 - m_Points: - m_Paths: - - - {x: 1.5, y: -0.11} - - {x: -1.5, y: 2} - - {x: -1.5, y: -1.91} + m_SourcePrefab: {fileID: 100100000, guid: 76a394fdf7248fa47bd4aa9e89fd70b3, type: 3} diff --git a/Assets/graphic/icosahedron.fbx.meta b/Assets/graphic/icosahedron.fbx.meta index e86a11f..a164947 100644 --- a/Assets/graphic/icosahedron.fbx.meta +++ b/Assets/graphic/icosahedron.fbx.meta @@ -1,5 +1,8 @@ fileFormatVersion: 2 guid: 8e2dfd83278260a45a65dabad360eff3 +labels: +- 3d +- Enemy ModelImporter: serializedVersion: 26 internalIDToNameTable: [] diff --git a/Assets/graphic/player.svg b/Assets/graphic/player.svg new file mode 100644 index 0000000..f0cce91 --- /dev/null +++ b/Assets/graphic/player.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Assets/prefab/player.svg.meta b/Assets/graphic/player.svg.meta similarity index 98% rename from Assets/prefab/player.svg.meta rename to Assets/graphic/player.svg.meta index bb21a89..61a7d46 100644 --- a/Assets/prefab/player.svg.meta +++ b/Assets/graphic/player.svg.meta @@ -1,5 +1,8 @@ fileFormatVersion: 2 guid: 7b67dca947db1b646a7d717291a09451 +labels: +- 2d +- Player ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Assets/prefab/player.svg b/Assets/prefab/player.svg deleted file mode 100644 index d5842f4..0000000 --- a/Assets/prefab/player.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/Assets/prefab/playerSprite.prefab b/Assets/prefab/playerSprite.prefab new file mode 100644 index 0000000..969e0cc --- /dev/null +++ b/Assets/prefab/playerSprite.prefab @@ -0,0 +1,242 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &902015223802321990 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 902015223802322008} + - component: {fileID: 902015223802322009} + - component: {fileID: 3762569353862921030} + - component: {fileID: 5583152964437817284} + - component: {fileID: 7666999436434910021} + m_Layer: 0 + m_Name: playerSprite + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &902015223802322008 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902015223802321990} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &902015223802322009 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902015223802321990} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 3286163911610860551, guid: 7b67dca947db1b646a7d717291a09451, + type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.5999999, y: 0.78} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!60 &3762569353862921030 +PolygonCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902015223802321990} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 0.5999999, y: 0.78} + newSize: {x: 0.5999999, y: 0.78} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Points: + m_Paths: + - - {x: 0.3, y: -0.03} + - {x: -0.3, y: 0.39} + - {x: -0.3, y: -0.39} +--- !u!114 &5583152964437817284 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902015223802321990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4c9d76b1e7bbf2d498eca3de6f5f8d08, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: 0 +--- !u!114 &7666999436434910021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902015223802321990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Actions: {fileID: -944628639613478452, guid: f91350d5319977b42872fee38c8debda, + type: 3} + m_NotificationBehavior: 2 + m_UIInputModule: {fileID: 0} + m_DeviceLostEvent: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+DeviceLostEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_DeviceRegainedEvent: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+DeviceRegainedEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ControlsChangedEvent: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ControlsChangedEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionEvents: + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: f10febac-3b9d-4f43-86b2-3898456425dc + m_ActionName: Player/Move + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: b85bc951-ecd5-4b59-8a0a-96d0132fb749 + m_ActionName: Player/Fire + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: eda972a2-b5b1-4456-a6e8-c4c4c0126bbc + m_ActionName: UI/Navigate + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: ff61b855-5d35-4b92-803d-54df71e92f43 + m_ActionName: UI/Submit + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: b2e5a1e8-84a0-4971-ad3c-23578135214d + m_ActionName: UI/Cancel + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: e3fffae5-6906-4a66-8f97-1f17eb445f3e + m_ActionName: UI/Point + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: b52d3af4-e1ea-40cd-9fbd-241396155570 + m_ActionName: UI/Click + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 7d028296-bff2-4c40-9516-cc57eac18165 + m_ActionName: UI/ScrollWheel + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 04ad30d6-00ec-4687-9bfe-b2399572bf72 + m_ActionName: UI/MiddleClick + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 8b53a125-3ed6-4798-99c5-3d9d0a66443f + m_ActionName: UI/RightClick + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 99e0de71-f564-450a-8771-d754283d8bd0 + m_ActionName: UI/TrackedDevicePosition + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: cd50b450-8c0f-4576-837d-585c74fc8b64 + m_ActionName: UI/TrackedDeviceOrientation + - m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.InputSystem.PlayerInput+ActionEvent, Unity.InputSystem, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_ActionId: 14dd58fa-0582-46b5-b494-d4893c5ae0aa + m_ActionName: UI/TrackedDeviceSelect + m_NeverAutoSwitchControlSchemes: 0 + m_DefaultControlScheme: Keyboard&Mouse + m_DefaultActionMap: Player + m_SplitScreenIndex: -1 + m_Camera: {fileID: 0} diff --git a/Assets/prefab/playerSprite.prefab.meta b/Assets/prefab/playerSprite.prefab.meta new file mode 100644 index 0000000..e2f3a12 --- /dev/null +++ b/Assets/prefab/playerSprite.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76a394fdf7248fa47bd4aa9e89fd70b3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/script/movement.meta b/Assets/script/movement.meta new file mode 100644 index 0000000..e63739e --- /dev/null +++ b/Assets/script/movement.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 950cc6d2bbff5bc4f9439caba4f5ed96 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/script/movement/Bullet.cs b/Assets/script/movement/Bullet.cs new file mode 100644 index 0000000..b24a13e --- /dev/null +++ b/Assets/script/movement/Bullet.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Bullet : MonoBehaviour +{ + Rigidbody2D rb; + public float damage; + public float time = 2f; + + public void ApplyVel(Vector2 dir,float speed) { + rb = GetComponent(); + rb.velocity = dir * speed; + Destroy(gameObject, time); + } + private void OnCollisionEnter2D(Collision2D c) { + Destroy(gameObject); + } +} diff --git a/Assets/script/movement/Bullet.cs.meta b/Assets/script/movement/Bullet.cs.meta new file mode 100644 index 0000000..63546e4 --- /dev/null +++ b/Assets/script/movement/Bullet.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d44ecfac57ea864390136ef706f6ad3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/script/movement/PlayerController.cs b/Assets/script/movement/PlayerController.cs new file mode 100644 index 0000000..d2ebb75 --- /dev/null +++ b/Assets/script/movement/PlayerController.cs @@ -0,0 +1,38 @@ +using System.Collections; +using System.Collections.Generic; +using System; +using UnityEngine; +using UnityEngine.InputSystem; + + +public class PlayerController : MonoBehaviour { + Vector3 direction; + public float speed; +#if tmp + public GameObject bullet; +#endif + AudioSource aus; + // Start is called before the first frame update + void Start() { + aus = GetComponent(); + } + + // Update is called once per frame + void Update() { + //direction = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0); + gameObject.transform.position += Vector3.Normalize(new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0))*0.25f; + /*if(Input.GetButtonDown("Fire1")) { + Vector3 offset = transform.position + new Vector3(lastDirection.x+0.1f, lastDirection.y+0.1f, 0f); + aus.Play(); + GameObject.Instantiate(bullet, offset, Quaternion.identity); + }*/ + } + + /*private void FixedUpdate() { + gameObject.transform.position += Vector3.Normalize(direction)*0.1f; + }*/ + public void Move(InputValue v) { + var m = v.Get(); + gameObject.transform.position = new Vector3(m.x, m.y, 0f); + } +} diff --git a/Assets/script/movement/PlayerController.cs.meta b/Assets/script/movement/PlayerController.cs.meta new file mode 100644 index 0000000..b552eba --- /dev/null +++ b/Assets/script/movement/PlayerController.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 4c9d76b1e7bbf2d498eca3de6f5f8d08 +labels: +- 2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/technix.inputactions b/Assets/technix.inputactions new file mode 100644 index 0000000..dc63f4d --- /dev/null +++ b/Assets/technix.inputactions @@ -0,0 +1,781 @@ +{ + "name": "technix", + "maps": [ + { + "name": "Player", + "id": "07c17fc6-45ae-4c62-a5a1-29fbf94eadfd", + "actions": [ + { + "name": "Move", + "type": "Value", + "id": "f10febac-3b9d-4f43-86b2-3898456425dc", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + }, + { + "name": "Fire", + "type": "Button", + "id": "b85bc951-ecd5-4b59-8a0a-96d0132fb749", + "expectedControlType": "Button", + "processors": "", + "interactions": "" + } + ], + "bindings": [ + { + "name": "", + "id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403", + "path": "/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": "/w", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "320bffee-a40b-4347-ac70-c210eb8bc73a", + "path": "/s", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc", + "path": "/a", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "2e46982e-44cc-431b-9f0b-c11910bf467a", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400", + "path": "/d", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "77bff152-3580-4b21-b6de-dcd0c7e41164", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8", + "path": "/{Primary2DAxis}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "3ea4d645-4504-4529-b061-ab81934c3752", + "path": "/stick", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Move", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91", + "path": "/rightTrigger", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "05f6913d-c316-48b2-a6bb-e225f14c7960", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "886e731e-7071-4ae4-95c0-e61739dad6fd", + "path": "/primaryTouch/tap", + "interactions": "", + "processors": "", + "groups": ";Touch", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8255d333-5683-4943-a58a-ccb207ff1dce", + "path": "/{PrimaryAction}", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "Fire", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, + { + "name": "UI", + "id": "66f78d8a-4517-423b-b648-edd3638c2c58", + "actions": [ + { + "name": "Navigate", + "type": "Value", + "id": "eda972a2-b5b1-4456-a6e8-c4c4c0126bbc", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + }, + { + "name": "Submit", + "type": "Button", + "id": "ff61b855-5d35-4b92-803d-54df71e92f43", + "expectedControlType": "Button", + "processors": "", + "interactions": "" + }, + { + "name": "Cancel", + "type": "Button", + "id": "b2e5a1e8-84a0-4971-ad3c-23578135214d", + "expectedControlType": "Button", + "processors": "", + "interactions": "" + }, + { + "name": "Point", + "type": "PassThrough", + "id": "e3fffae5-6906-4a66-8f97-1f17eb445f3e", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + }, + { + "name": "Click", + "type": "PassThrough", + "id": "b52d3af4-e1ea-40cd-9fbd-241396155570", + "expectedControlType": "Button", + "processors": "", + "interactions": "" + }, + { + "name": "ScrollWheel", + "type": "PassThrough", + "id": "7d028296-bff2-4c40-9516-cc57eac18165", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "" + }, + { + "name": "MiddleClick", + "type": "PassThrough", + "id": "04ad30d6-00ec-4687-9bfe-b2399572bf72", + "expectedControlType": "", + "processors": "", + "interactions": "" + }, + { + "name": "RightClick", + "type": "PassThrough", + "id": "8b53a125-3ed6-4798-99c5-3d9d0a66443f", + "expectedControlType": "", + "processors": "", + "interactions": "" + }, + { + "name": "TrackedDevicePosition", + "type": "PassThrough", + "id": "99e0de71-f564-450a-8771-d754283d8bd0", + "expectedControlType": "Vector3", + "processors": "", + "interactions": "" + }, + { + "name": "TrackedDeviceOrientation", + "type": "PassThrough", + "id": "cd50b450-8c0f-4576-837d-585c74fc8b64", + "expectedControlType": "Quaternion", + "processors": "", + "interactions": "" + }, + { + "name": "TrackedDeviceSelect", + "type": "PassThrough", + "id": "14dd58fa-0582-46b5-b494-d4893c5ae0aa", + "expectedControlType": "Button", + "processors": "", + "interactions": "" + } + ], + "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": "/leftStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "9144cbe6-05e1-4687-a6d7-24f99d23dd81", + "path": "/rightStick/up", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2db08d65-c5fb-421b-983f-c71163608d67", + "path": "/leftStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "58748904-2ea9-4a80-8579-b500e6a76df8", + "path": "/rightStick/down", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "8ba04515-75aa-45de-966d-393d9bbd1c14", + "path": "/leftStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "712e721c-bdfb-4b23-a86c-a0d9fcfea921", + "path": "/rightStick/left", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "fcd248ae-a788-4676-a12e-f4d81205600b", + "path": "/leftStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "1f04d9bc-c50b-41a1-bfcc-afb75475ec20", + "path": "/rightStick/right", + "interactions": "", + "processors": "", + "groups": ";Gamepad", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "fb8277d4-c5cd-4663-9dc7-ee3f0b506d90", + "path": "/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": "/stick/up", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "0cb3e13e-3d90-4178-8ae6-d9c5501d653f", + "path": "/stick/down", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "0392d399-f6dd-4c82-8062-c1e9c0d34835", + "path": "/stick/left", + "interactions": "", + "processors": "", + "groups": "Joystick", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "942a66d9-d42f-43d6-8d70-ecb4ba5363bc", + "path": "/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": "/w", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "eb480147-c587-4a33-85ed-eb0ab9942c43", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "2bf42165-60bc-42ca-8072-8c13ab40239b", + "path": "/s", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "85d264ad-e0a0-4565-b7ff-1a37edde51ac", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "74214943-c580-44e4-98eb-ad7eebe17902", + "path": "/a", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "cea9b045-a000-445b-95b8-0c171af70a3b", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "8607c725-d935-4808-84b1-8354e29bab63", + "path": "/d", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "4cda81dc-9edd-4e03-9d7c-a71a14345d0b", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Navigate", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc", + "path": "*/{Submit}", + "interactions": "", + "processors": "", + "groups": "", + "action": "Submit", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "82627dcc-3b13-4ba9-841d-e4b746d6553e", + "path": "*/{Cancel}", + "interactions": "", + "processors": "", + "groups": "", + "action": "Cancel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "c52c8e0b-8179-41d3-b8a1-d149033bbe86", + "path": "/position", + "interactions": "", + "processors": "", + "groups": "Keyboard&Mouse", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "5693e57a-238a-46ed-b5ae-e64e6e574302", + "path": "/touch*/position", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Point", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4faf7dc9-b979-4210-aa8c-e808e1ef89f5", + "path": "/leftButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "8d66d5ba-88d7-48e6-b1cd-198bbfef7ace", + "path": "/tip", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "47c2a644-3ebc-4dae-a106-589b7ca75b59", + "path": "/touch*/press", + "interactions": "", + "processors": "", + "groups": "Touch", + "action": "Click", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "38c99815-14ea-4617-8627-164d27641299", + "path": "/scroll", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "ScrollWheel", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "24066f69-da47-44f3-a07e-0015fb02eb2e", + "path": "/middleButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "MiddleClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "4c191405-5738-4d4b-a523-c6a301dbf754", + "path": "/rightButton", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "RightClick", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77", + "path": "/devicePosition", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDevicePosition", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "23e01e3a-f935-4948-8d8b-9bcac77714fb", + "path": "/deviceRotation", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDeviceOrientation", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "932fe797-a0a9-4eef-bd2d-556b362e08d0", + "path": "/trigger", + "interactions": "", + "processors": "", + "groups": "XR", + "action": "TrackedDeviceSelect", + "isComposite": false, + "isPartOfComposite": false + } + ] + } + ], + "controlSchemes": [ + { + "name": "Keyboard&Mouse", + "bindingGroup": "Keyboard&Mouse", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Gamepad", + "bindingGroup": "Gamepad", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Touch", + "bindingGroup": "Touch", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "Joystick", + "bindingGroup": "Joystick", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + }, + { + "name": "XR", + "bindingGroup": "XR", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/technix.inputactions.meta b/Assets/technix.inputactions.meta new file mode 100644 index 0000000..d8e44e7 --- /dev/null +++ b/Assets/technix.inputactions.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: f91350d5319977b42872fee38c8debda +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} + generateWrapperCode: 0 + wrapperCodePath: + wrapperClassName: + wrapperCodeNamespace: diff --git a/Packages/manifest.json b/Packages/manifest.json index 2390fc0..d62872e 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -5,6 +5,7 @@ "com.unity.collab-proxy": "1.2.16", "com.unity.ext.nunit": "1.0.0", "com.unity.ide.vscode": "1.1.4", + "com.unity.inputsystem": "1.0.0-preview.4", "com.unity.package-manager-ui": "2.2.0", "com.unity.test-framework": "1.0.18", "com.unity.textmeshpro": "2.0.1", diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 82ab0f5..2e145e0 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,4 +8,6 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/SampleScene.unity guid: 2cda990e2423bbf4892e6590ba056729 - m_configObjects: {} + m_configObjects: + com.unity.input.settings: {fileID: 11400000, guid: bbddc30c1394e1940b4139bd942ae09f, + type: 2} diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset index 113b8ede7ba7b973e9331f5073127b3adf7da149..6c5cf8a004ac48f27cb36f7cdea139eb4d3e812f 100644 GIT binary patch literal 2028 zcmd^A%WmQ@6y5U`?xM2-L;{q@E`VsMO6fFArCA}981U4wk?oYy(fs>dKN3SH@?CL*hctsofI8jXfQg8}*$)Sh-n zMH3ZHVxl$WTQ#g9l&u!)UnJ3YG$m7p;SsgqSrJJwqaP%FAyQGnhp1!Ow-UcWlp*^4 z4$L}&{~Cj4Klo$O3EAMB={eTc9#|X7$ZP^sM|dGjBw#-S0@mOc;`OcRlTg$=RFSqt z3Y+Cl615X79iqSjbNv25Il*!)q=Xu5nyqG7fDzy3>@(_Of#FhOu9!_B-Vm z3I;9ViS^rZ1^NQcaaW-4^;mEX;TD^XBHDQNw)bMa*t-rx{EHJceh|tPnZwMehW6qV zbOBBZ0GunTG~vlH7Sf2O0JGJM!wmPr^$?~<)Dw{qwdkbjYzV6mGgj3Wj9jQ=W@l zeMy^Ao<2e@MCq@y{jpC$^-D>&TLOZ#Ln$MkikgAwcp3}#W>`vBMO{``C7B`((d)?w z!!)2u@zJWRqQWZeUQiANoLpTZK{$G$Q&m6b#o2adt0>nZrWtIUTSO<}?>SroqVA~n zt$~IAgv1&)YR0`9WC@QkV{4qess)ER;&`(P&h>dtM}^IFx6=Eo~7vI^b7RgOG3| z;TI0VP5&nBb?eBiSaVQ*gna_A(`^mv#=vG5)w_Mccyl>rMG+S?qPQh zChY-YqKQ#YdV;82-53uT6NPvX5;GR}wbQe+?bVoAGxetG{i=J*?&(B*Hbhi`C&##=jd~EY;SIeX4 zE{FSGIkt5K+PQ0lz*m(ggorU^UUlL`M`_`6Zn=m*wnWUaG|6fT`A^`tL2(1>G6e>d zq_Chl3)>se=KSSUiUB1l4Bv=0dE(CiT1lb(0W_aPy$SVN)O6weUtpj6;oR#`;VNWO z$OqwH4PE+oJ!&tv)chBq=X{Py7p_nHFGERwV;Z7O&i$R%d_@L-PxF--d`@%jFV-mhX1Vjsto?S=C@>U<_hg6iPRlr>~GY3br-3Y;oCH49;A!mCCybjrUn@P zyynQ|p0W%(48TsK?gv>*dLgD%h37kp_`d^=ued{LV{N>Uj9o91^b5-Ukz_%d7=w7*`FSV;=Q*J{q|1lv)P!tm{y-=j#Z zB!%H4n)5nZYQCfSy&3$J<^vi0ea-L7;9qEde+K_i^GzB2s^*(B_&VG;7{3QHcuw;N z`?#g@V+iN5&w!|4t*-rQo%^%I+b8JJ#s1kjeq$JZu~3s@x;GV+P`8S@AYpegB$-!8Ql0c zoWYHM&-8Iie23@zyYP?iFJzq9dx+DA=b59kL@CIJTP`-j7kk za>8!Akx@cZc3fE*Mx$y+ld5r4x_$$uDwt?Tj_=WY)ejxEdz5BmeKL^Yr0+H{@Q^(_ z>Uh!)N`4T?2InN&qStD>{pxyPd!eh=sZC3%O&sx~9@UWDo@&`aBx?=Zl`y!Vs5?_~ zY@#wXZ8stVsjK@nSITJ&P25qvy6<97UV|32KYe-~qLS}LFgZ3c5z0vDV2=3XW78@m zIfks;741+SLSUT;p|G1c6KY^1bizn_jZV!Ecv6^D@etQ(KiM+ED#NM_UMm|&zSfc>%|%S1k%d&0}+Up7#FshkStvcdGREaW)khfad1*s z&Be^nQM<$A)|4<<&_N=)1LAVEZ+4{;`}#XkMez> zD8wZ^mp>^b{Q}