This commit is contained in:
ntr committed 2023-07-25 18:47:45 +10:00
1 parent 6eb7bac08a
commit 6704c3ae59
46 files changed
+5298 -74

No files matched your search

+133
View File
@@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-9054159900995077648
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 00007--263407052
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: bea628a9753f0f04983c95e4a979d0ed, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: bea628a9753f0f04983c95e4a979d0ed, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 552c9652fdec3a6d980bb03db4706ea5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+133
View File
@@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-1371991816016477643
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 00025-3390040379
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: d0a0bee744a166c05b51060da308e61a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: d0a0bee744a166c05b51060da308e61a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5c6ae25f73498fb4db2e36a46d2c620f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +1,8 @@
{
"name": "ShipInput",
"name": "SpaceRaceInput",
"maps": [
{
"name": "movement",
"name": "ship",
"id": "f52df5ad-4b20-4a0e-a4c8-bbf76c26b2c5",
"actions": [
{
@@ -315,6 +315,45 @@
"isPartOfComposite": false
}
]
},
{
"name": "menu",
"id": "88ca6226-1e9b-4abe-b02e-7b1304ef28ae",
"actions": [
{
"name": "ToggleMenu",
"type": "Button",
"id": "cee6d41d-d488-4548-b2d6-11e16bb6b116",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "264c9b3e-9257-4ea7-ad15-c2469ae762f2",
"path": "<Gamepad>/start",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleMenu",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1a12ee48-3233-43b7-88a3-175016b24098",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "",
"action": "ToggleMenu",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
@@ -172,6 +172,54 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &114959033
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 114959034}
- component: {fileID: 114959035}
m_Layer: 0
m_Name: MenuDoc
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 2147483647
m_IsActive: 1
--- !u!4 &114959034
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 114959033}
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: 1914996160}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114959035
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 114959033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: dab173ab15446054bb709b9a7ab085b6, type: 2}
m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: 59e6af4d391d177a8910e7a8ab6e05e6, type: 3}
m_SortingOrder: 0
--- !u!1001 &339815783
PrefabInstance:
m_ObjectHideFlags: 0
@@ -264,10 +312,18 @@ PrefabInstance:
propertyPath: m_Name
value: Sector N (5)
objectReference: {fileID: 0}
- target: {fileID: 6055114146370815326, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -401,7 +457,7 @@ Camera:
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
far clip plane: 2000
field of view: 60
orthographic: 0
orthographic size: 5
@@ -550,6 +606,22 @@ PrefabInstance:
propertyPath: m_Name
value: Timing
objectReference: {fileID: 0}
- target: {fileID: 2603084029878042569, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 2884870557220750692, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
propertyPath: m_Name
value: TimingDoc
objectReference: {fileID: 0}
- target: {fileID: 2884870557220750692, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2884870557220750692, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 4743817676494260426, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
propertyPath: m_RootOrder
value: -1
@@ -639,7 +711,7 @@ GameObject:
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 2147483647
m_IsActive: 1
--- !u!4 &965851724
Transform:
@@ -677,6 +749,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 965851724}
m_Modifications:
- target: {fileID: -8873558038744925118, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: -8708185297467244275, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_IsActive
value: 0
@@ -745,6 +821,10 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: -3756473180518285571, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: -1823322365421230674, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
@@ -753,10 +833,18 @@ PrefabInstance:
propertyPath: m_Name
value: silverstorage
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 3592631056726975269, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3592631056726975269, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 5558786085232576308, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
@@ -765,6 +853,10 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5610006482927226887, guid: 474d908ae00ea2447883cf399db91645, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -893,10 +985,18 @@ PrefabInstance:
propertyPath: m_Name
value: Sector N (6)
objectReference: {fileID: 0}
- target: {fileID: 6055114146370815326, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -907,6 +1007,17 @@ Transform:
m_CorrespondingSourceObject: {fileID: 273700024047119412, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
m_PrefabInstance: {fileID: 1650371476}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1705992920 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 957429026670911964, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
m_PrefabInstance: {fileID: 766862834}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1906469784
GameObject:
m_ObjectHideFlags: 0
@@ -939,6 +1050,54 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1914996159
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1914996160}
- component: {fileID: 1914996162}
m_Layer: 0
m_Name: Menu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 2147483647
m_IsActive: 1
--- !u!4 &1914996160
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1914996159}
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:
- {fileID: 114959034}
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1914996162
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1914996159}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b7da082ca2a8e6ee9a5b1151245f535f, type: 3}
m_Name:
m_EditorClassIdentifier:
menuDoc: {fileID: 114959035}
timingDoc: {fileID: 1705992920}
shipControls: {fileID: 1972710421}
--- !u!1 &1972710416
GameObject:
m_ObjectHideFlags: 0
@@ -955,6 +1114,7 @@ GameObject:
- component: {fileID: 1972710421}
- component: {fileID: 1972710424}
- component: {fileID: 1972710425}
- component: {fileID: 1972710426}
m_Layer: 10
m_Name: Ship
m_TagString: Untagged
@@ -1003,7 +1163,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a1ae10f4d23cf6121935ac77eb61ab79, type: 2}
- {fileID: 2100000, guid: 5c6ae25f73498fb4db2e36a46d2c620f, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -1040,7 +1200,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1972710416}
m_LocalRotation: {x: 0, y: 0.88700384, z: 0, w: 0.46176213}
m_LocalRotation: {x: 0, y: 0.88294756, z: 0, w: 0.46947163}
m_LocalPosition: {x: -838.9999, y: 0, z: 945.99976}
m_LocalScale: {x: 2.45, y: 2.45, z: 2.45}
m_ConstrainProportionsScale: 0
@@ -1049,7 +1209,7 @@ Transform:
- {fileID: 666695209}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 113.716, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 124, z: 0}
--- !u!114 &1972710421
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1140,9 +1300,13 @@ MonoBehaviour:
m_Calls: []
m_ActionId: cea65125-c42e-40e9-bc97-966522e16691
m_ActionName: movement/quit[/Keyboard/f10]
- m_PersistentCalls:
m_Calls: []
m_ActionId: cee6d41d-d488-4548-b2d6-11e16bb6b116
m_ActionName: menu/New action[/Gamepad/start,/Keyboard/escape]
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme:
m_DefaultActionMap: movement
m_DefaultActionMap: ship
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!114 &1972710425
@@ -1157,6 +1321,21 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cee35157fdc2b133bf69416f2db2ac3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1972710426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1972710416}
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!1 &2129212232
GameObject:
m_ObjectHideFlags: 0
@@ -1395,10 +1574,18 @@ PrefabInstance:
propertyPath: m_Name
value: Sector N (4)
objectReference: {fileID: 0}
- target: {fileID: 6055114146370815326, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7552537107678286293, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_StaticEditorFlags
value: 2147483647
objectReference: {fileID: 0}
- target: {fileID: 8222871353402791901, guid: 87a51212e10250274a8feda6be865b7c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
+11 -10
View File
@@ -1,11 +1,11 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class ShipControls : MonoBehaviour, ShipInput.IMovementActions {
public class ShipControls : MonoBehaviour, SpaceRaceInput.IShipActions {
public Camera aim;
public Timing timing;
ShipInput shipInput;
SpaceRaceInput input;
InputAction lookAction;
InputAction accelerateAction;
InputAction decelerateAction;
@@ -39,7 +39,7 @@ public class ShipControls : MonoBehaviour, ShipInput.IMovementActions {
rigidBody.freezeRotation = true;
initialPosition = rigidBody.transform.position;
initialAim = aim.transform.rotation;
initialAim = rigidBody.transform.rotation;
initialForce = Vector3.forward;
thrust = Vector3.zero;
@@ -54,15 +54,15 @@ public class ShipControls : MonoBehaviour, ShipInput.IMovementActions {
camYaw = initialAim.eulerAngles.y;
forceMode = ForceMode.Acceleration;
if (shipInput == null) {
shipInput = new ShipInput();
shipInput.movement.SetCallbacks(this);
if (input == null) {
input = new SpaceRaceInput();
input.ship.SetCallbacks(this);
}
shipInput.movement.Enable();
input.ship.Enable();
lookAction = shipInput.FindAction("look");
accelerateAction = shipInput.FindAction("accelerate");
decelerateAction = shipInput.FindAction("decelerate");
lookAction = input.FindAction("look");
accelerateAction = input.FindAction("accelerate");
decelerateAction = input.FindAction("decelerate");
}
void Update() {
@@ -158,6 +158,7 @@ public class ShipControls : MonoBehaviour, ShipInput.IMovementActions {
rigidBody.transform.forward = initialForce;
rigidBody.velocity = new Vector3(0f, 0f, 0f);
rigidBody.angularVelocity = new Vector3(0f, 0f, 0f);
rigidBody.transform.rotation = initialAim;
aim.transform.rotation = initialAim;
camPitch = initialAim.eulerAngles.x;
+136 -44
View File
@@ -2,7 +2,7 @@
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.6.1
// from Assets/Resources/ShipInput.inputactions
// from Assets/Resources/SpaceRaceInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -15,16 +15,16 @@ using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @ShipInput: IInputActionCollection2, IDisposable
public partial class @SpaceRaceInput: IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @ShipInput()
public @SpaceRaceInput()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""ShipInput"",
""name"": ""SpaceRaceInput"",
""maps"": [
{
""name"": ""movement"",
""name"": ""ship"",
""id"": ""f52df5ad-4b20-4a0e-a4c8-bbf76c26b2c5"",
""actions"": [
{
@@ -337,18 +337,60 @@ public partial class @ShipInput: IInputActionCollection2, IDisposable
""isPartOfComposite"": false
}
]
},
{
""name"": ""menu"",
""id"": ""88ca6226-1e9b-4abe-b02e-7b1304ef28ae"",
""actions"": [
{
""name"": ""ToggleMenu"",
""type"": ""Button"",
""id"": ""cee6d41d-d488-4548-b2d6-11e16bb6b116"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""264c9b3e-9257-4ea7-ad15-c2469ae762f2"",
""path"": ""<Gamepad>/start"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""ToggleMenu"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""1a12ee48-3233-43b7-88a3-175016b24098"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""ToggleMenu"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// movement
m_movement = asset.FindActionMap("movement", throwIfNotFound: true);
m_movement_accelerate = m_movement.FindAction("accelerate", throwIfNotFound: true);
m_movement_decelerate = m_movement.FindAction("decelerate", throwIfNotFound: true);
m_movement_strafe = m_movement.FindAction("strafe", throwIfNotFound: true);
m_movement_look = m_movement.FindAction("look", throwIfNotFound: true);
m_movement_respawn = m_movement.FindAction("respawn", throwIfNotFound: true);
m_movement_quit = m_movement.FindAction("quit", throwIfNotFound: true);
// ship
m_ship = asset.FindActionMap("ship", throwIfNotFound: true);
m_ship_accelerate = m_ship.FindAction("accelerate", throwIfNotFound: true);
m_ship_decelerate = m_ship.FindAction("decelerate", throwIfNotFound: true);
m_ship_strafe = m_ship.FindAction("strafe", throwIfNotFound: true);
m_ship_look = m_ship.FindAction("look", throwIfNotFound: true);
m_ship_respawn = m_ship.FindAction("respawn", throwIfNotFound: true);
m_ship_quit = m_ship.FindAction("quit", throwIfNotFound: true);
// menu
m_menu = asset.FindActionMap("menu", throwIfNotFound: true);
m_menu_ToggleMenu = m_menu.FindAction("ToggleMenu", throwIfNotFound: true);
}
public void Dispose()
@@ -407,34 +449,34 @@ public partial class @ShipInput: IInputActionCollection2, IDisposable
return asset.FindBinding(bindingMask, out action);
}
// movement
private readonly InputActionMap m_movement;
private List<IMovementActions> m_MovementActionsCallbackInterfaces = new List<IMovementActions>();
private readonly InputAction m_movement_accelerate;
private readonly InputAction m_movement_decelerate;
private readonly InputAction m_movement_strafe;
private readonly InputAction m_movement_look;
private readonly InputAction m_movement_respawn;
private readonly InputAction m_movement_quit;
public struct MovementActions
// ship
private readonly InputActionMap m_ship;
private List<IShipActions> m_ShipActionsCallbackInterfaces = new List<IShipActions>();
private readonly InputAction m_ship_accelerate;
private readonly InputAction m_ship_decelerate;
private readonly InputAction m_ship_strafe;
private readonly InputAction m_ship_look;
private readonly InputAction m_ship_respawn;
private readonly InputAction m_ship_quit;
public struct ShipActions
{
private @ShipInput m_Wrapper;
public MovementActions(@ShipInput wrapper) { m_Wrapper = wrapper; }
public InputAction @accelerate => m_Wrapper.m_movement_accelerate;
public InputAction @decelerate => m_Wrapper.m_movement_decelerate;
public InputAction @strafe => m_Wrapper.m_movement_strafe;
public InputAction @look => m_Wrapper.m_movement_look;
public InputAction @respawn => m_Wrapper.m_movement_respawn;
public InputAction @quit => m_Wrapper.m_movement_quit;
public InputActionMap Get() { return m_Wrapper.m_movement; }
private @SpaceRaceInput m_Wrapper;
public ShipActions(@SpaceRaceInput wrapper) { m_Wrapper = wrapper; }
public InputAction @accelerate => m_Wrapper.m_ship_accelerate;
public InputAction @decelerate => m_Wrapper.m_ship_decelerate;
public InputAction @strafe => m_Wrapper.m_ship_strafe;
public InputAction @look => m_Wrapper.m_ship_look;
public InputAction @respawn => m_Wrapper.m_ship_respawn;
public InputAction @quit => m_Wrapper.m_ship_quit;
public InputActionMap Get() { return m_Wrapper.m_ship; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MovementActions set) { return set.Get(); }
public void AddCallbacks(IMovementActions instance)
public static implicit operator InputActionMap(ShipActions set) { return set.Get(); }
public void AddCallbacks(IShipActions instance)
{
if (instance == null || m_Wrapper.m_MovementActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_MovementActionsCallbackInterfaces.Add(instance);
if (instance == null || m_Wrapper.m_ShipActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_ShipActionsCallbackInterfaces.Add(instance);
@accelerate.started += instance.OnAccelerate;
@accelerate.performed += instance.OnAccelerate;
@accelerate.canceled += instance.OnAccelerate;
@@ -455,7 +497,7 @@ public partial class @ShipInput: IInputActionCollection2, IDisposable
@quit.canceled += instance.OnQuit;
}
private void UnregisterCallbacks(IMovementActions instance)
private void UnregisterCallbacks(IShipActions instance)
{
@accelerate.started -= instance.OnAccelerate;
@accelerate.performed -= instance.OnAccelerate;
@@ -477,22 +519,68 @@ public partial class @ShipInput: IInputActionCollection2, IDisposable
@quit.canceled -= instance.OnQuit;
}
public void RemoveCallbacks(IMovementActions instance)
public void RemoveCallbacks(IShipActions instance)
{
if (m_Wrapper.m_MovementActionsCallbackInterfaces.Remove(instance))
if (m_Wrapper.m_ShipActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
public void SetCallbacks(IMovementActions instance)
public void SetCallbacks(IShipActions instance)
{
foreach (var item in m_Wrapper.m_MovementActionsCallbackInterfaces)
foreach (var item in m_Wrapper.m_ShipActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_MovementActionsCallbackInterfaces.Clear();
m_Wrapper.m_ShipActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
public MovementActions @movement => new MovementActions(this);
public interface IMovementActions
public ShipActions @ship => new ShipActions(this);
// menu
private readonly InputActionMap m_menu;
private List<IMenuActions> m_MenuActionsCallbackInterfaces = new List<IMenuActions>();
private readonly InputAction m_menu_ToggleMenu;
public struct MenuActions
{
private @SpaceRaceInput m_Wrapper;
public MenuActions(@SpaceRaceInput wrapper) { m_Wrapper = wrapper; }
public InputAction @ToggleMenu => m_Wrapper.m_menu_ToggleMenu;
public InputActionMap Get() { return m_Wrapper.m_menu; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MenuActions set) { return set.Get(); }
public void AddCallbacks(IMenuActions instance)
{
if (instance == null || m_Wrapper.m_MenuActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_MenuActionsCallbackInterfaces.Add(instance);
@ToggleMenu.started += instance.OnToggleMenu;
@ToggleMenu.performed += instance.OnToggleMenu;
@ToggleMenu.canceled += instance.OnToggleMenu;
}
private void UnregisterCallbacks(IMenuActions instance)
{
@ToggleMenu.started -= instance.OnToggleMenu;
@ToggleMenu.performed -= instance.OnToggleMenu;
@ToggleMenu.canceled -= instance.OnToggleMenu;
}
public void RemoveCallbacks(IMenuActions instance)
{
if (m_Wrapper.m_MenuActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
public void SetCallbacks(IMenuActions instance)
{
foreach (var item in m_Wrapper.m_MenuActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_MenuActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
public MenuActions @menu => new MenuActions(this);
public interface IShipActions
{
void OnAccelerate(InputAction.CallbackContext context);
void OnDecelerate(InputAction.CallbackContext context);
@@ -501,4 +589,8 @@ public partial class @ShipInput: IInputActionCollection2, IDisposable
void OnRespawn(InputAction.CallbackContext context);
void OnQuit(InputAction.CallbackContext context);
}
public interface IMenuActions
{
void OnToggleMenu(InputAction.CallbackContext context);
}
}
+7 -6
View File
@@ -15,15 +15,15 @@ public enum SectorColour {
public readonly struct SectorTime {
public SectorTime(int i, double t) {
Sector = i;
Value = t;
Seconds = t;
Colour = SectorColour.White;
}
public int Sector { get; }
public double Value { get; }
public double Seconds { get; }
public SectorColour Colour { get; }
public override string ToString() => $"{Value:0.000}";
public override string ToString() => $"{Seconds:0.000}";
// public string ColourClass() => Colour switch {
// SectorColour.Green => "green",
@@ -38,12 +38,13 @@ public struct Lap {
public int Number { get; set; }
public List<SectorTime> Sectors { get; set; }
// 0:1:39
public override string ToString() {
return $"Lap {Number} : {TimeSpan.FromSeconds(TotalTime()):g} {String.Join(" ", Sectors.ConvertAll(s => s.ToString()))}";
return $"{TimeSpan.FromSeconds(TotalTime()):m\\:ss\\.fff}";
}
public double TotalTime() {
return Sectors.Sum(s => s.Value);
return Sectors.Sum(s => s.Seconds);
}
}
@@ -154,7 +155,7 @@ public class Timing: MonoBehaviour {
var fastestLap = lapTimes.MinBy(l => l.TotalTime());
var fastestSector = fastestLap.Sectors.Single(fls => fls.Sector == s.Sector);
return (s.Value < fastestSector.Value) switch {
return (s.Seconds < fastestSector.Seconds) switch {
true => SectorColour.Green,
false => SectorColour.Yellow,
};
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6cb6aa050e90de06e84c577b183b9655
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+61
View File
@@ -0,0 +1,61 @@
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.InputSystem;
public class MenuControls : MonoBehaviour, SpaceRaceInput.IMenuActions {
[SerializeField]
UIDocument menuDoc;
[SerializeField]
UIDocument timingDoc;
[SerializeField]
ShipControls shipControls;
SpaceRaceInput input;
bool visible = false;
void Start() {
if (input == null) {
input = new SpaceRaceInput();
input.menu.SetCallbacks(this);
}
input.menu.Enable();
Debug.Log($"Menu {visible}");
Hide();
}
void Show() {
visible = true;
UnityEngine.Cursor.lockState = CursorLockMode.None;
menuDoc.enabled = true;
// take control off the ship
timingDoc.enabled = false;
shipControls.enabled = false;
}
void Hide() {
visible = false;
UnityEngine.Cursor.lockState = CursorLockMode.Locked;
menuDoc.enabled = false;
// resume control of the ship
timingDoc.enabled = true;
shipControls.enabled = true;
}
public void OnToggleMenu(InputAction.CallbackContext ctx) {
visible = !visible;
Debug.Log($"Menu {visible}");
if (visible) {
Show();
return;
}
Hide();
return;
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b7da082ca2a8e6ee9a5b1151245f535f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+284
View File
@@ -0,0 +1,284 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.6.1
// from Assets/Src/UI/MenuInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @MenuInput: IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @MenuInput()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""MenuInput"",
""maps"": [
{
""name"": ""menu"",
""id"": ""fddbd52a-f0f1-4589-8706-8a70d80fffc7"",
""actions"": [
{
""name"": ""Toggle"",
""type"": ""Button"",
""id"": ""ad2f7940-95f2-4063-87a1-7d42f3791e9f"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""e4962cb0-d885-416a-a080-db19f4a0a4c4"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Toggle"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""a9401517-73d8-4cc5-baaa-56db81951850"",
""path"": ""<Gamepad>/start"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Toggle"",
""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
}
]
}
]
}");
// menu
m_menu = asset.FindActionMap("menu", throwIfNotFound: true);
m_menu_Toggle = m_menu.FindAction("Toggle", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
public IEnumerable<InputBinding> bindings => asset.bindings;
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
{
return asset.FindAction(actionNameOrId, throwIfNotFound);
}
public int FindBinding(InputBinding bindingMask, out InputAction action)
{
return asset.FindBinding(bindingMask, out action);
}
// menu
private readonly InputActionMap m_menu;
private List<IMenuActions> m_MenuActionsCallbackInterfaces = new List<IMenuActions>();
private readonly InputAction m_menu_Toggle;
public struct MenuActions
{
private @MenuInput m_Wrapper;
public MenuActions(@MenuInput wrapper) { m_Wrapper = wrapper; }
public InputAction @Toggle => m_Wrapper.m_menu_Toggle;
public InputActionMap Get() { return m_Wrapper.m_menu; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MenuActions set) { return set.Get(); }
public void AddCallbacks(IMenuActions instance)
{
if (instance == null || m_Wrapper.m_MenuActionsCallbackInterfaces.Contains(instance)) return;
m_Wrapper.m_MenuActionsCallbackInterfaces.Add(instance);
@Toggle.started += instance.OnToggle;
@Toggle.performed += instance.OnToggle;
@Toggle.canceled += instance.OnToggle;
}
private void UnregisterCallbacks(IMenuActions instance)
{
@Toggle.started -= instance.OnToggle;
@Toggle.performed -= instance.OnToggle;
@Toggle.canceled -= instance.OnToggle;
}
public void RemoveCallbacks(IMenuActions instance)
{
if (m_Wrapper.m_MenuActionsCallbackInterfaces.Remove(instance))
UnregisterCallbacks(instance);
}
public void SetCallbacks(IMenuActions instance)
{
foreach (var item in m_Wrapper.m_MenuActionsCallbackInterfaces)
UnregisterCallbacks(item);
m_Wrapper.m_MenuActionsCallbackInterfaces.Clear();
AddCallbacks(instance);
}
}
public MenuActions @menu => new MenuActions(this);
private int m_KeyboardMouseSchemeIndex = -1;
public InputControlScheme KeyboardMouseScheme
{
get
{
if (m_KeyboardMouseSchemeIndex == -1) m_KeyboardMouseSchemeIndex = asset.FindControlSchemeIndex("Keyboard&Mouse");
return asset.controlSchemes[m_KeyboardMouseSchemeIndex];
}
}
private int m_GamepadSchemeIndex = -1;
public InputControlScheme GamepadScheme
{
get
{
if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad");
return asset.controlSchemes[m_GamepadSchemeIndex];
}
}
private int m_TouchSchemeIndex = -1;
public InputControlScheme TouchScheme
{
get
{
if (m_TouchSchemeIndex == -1) m_TouchSchemeIndex = asset.FindControlSchemeIndex("Touch");
return asset.controlSchemes[m_TouchSchemeIndex];
}
}
private int m_JoystickSchemeIndex = -1;
public InputControlScheme JoystickScheme
{
get
{
if (m_JoystickSchemeIndex == -1) m_JoystickSchemeIndex = asset.FindControlSchemeIndex("Joystick");
return asset.controlSchemes[m_JoystickSchemeIndex];
}
}
private int m_XRSchemeIndex = -1;
public InputControlScheme XRScheme
{
get
{
if (m_XRSchemeIndex == -1) m_XRSchemeIndex = asset.FindControlSchemeIndex("XR");
return asset.controlSchemes[m_XRSchemeIndex];
}
}
public interface IMenuActions
{
void OnToggle(InputAction.CallbackContext context);
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 337598c194bddae77922f951b35575d6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,11 +5,10 @@
--purple: rgb(164, 35, 188);
--yellow: rgb(255, 161, 0);
--white: rgb(245, 245, 245);
}
#shipUi {
color: var(--white);
font-size: 24px;
letter-spacing: 24px;
unity-font: "Jura Medium";
}
#list-entry {
@@ -31,7 +30,6 @@
.green {
color: var(--green);
font-weight: bold;
}
.purple {
File renamed without changes.
+23
View File
@@ -0,0 +1,23 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/Src/UI/ShipUi.uss?fileID=7433441132597879392&amp;guid=cf92f075876ddf7ffb4cd5c59633ad7b&amp;type=3#ShipUi" />
<ui:VisualElement name="Menu" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); -unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-Medium.otf?fileID=12800000&amp;guid=65648a14640996362a6b0929c723b6e4&amp;type=3#Jura-Medium&apos;); -unity-font-definition: initial; font-size: 38px; letter-spacing: 24px;">
<ui:VisualElement name="header" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);" />
<ui:VisualElement name="main" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: flex-start; flex-direction: row; align-items: flex-start;">
<ui:VisualElement name="tracks" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); justify-content: center;">
<ui:Label tabindex="-1" text="Track" display-tooltip-when-elided="true" name="Track" style="-unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-DemiBold.otf?fileID=12800000&amp;guid=1d103e83da4f14189b3e8b0b865eca3d&amp;type=3#Jura-DemiBold&apos;);" />
<ui:Button text="sr_junglism" display-tooltip-when-elided="true" />
<ui:Button text="sr_silverstorage" display-tooltip-when-elided="true" />
</ui:VisualElement>
<ui:VisualElement name="settings" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); flex-direction: column; align-self: auto; align-items: flex-end;">
<ui:Label tabindex="-1" text="Settings" display-tooltip-when-elided="true" style="-unity-font: url(&apos;project://database/Assets/UI%20Toolkit/Fonts/Jura-DemiBold.otf?fileID=12800000&amp;guid=1d103e83da4f14189b3e8b0b865eca3d&amp;type=3#Jura-DemiBold&apos;);" />
<ui:VisualElement name="controls" style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); font-size: 24px;">
<ui:Toggle label="Invert Y" name="Toggle" />
<ui:FloatField label="View Sensitivity" value="42.2" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="footer" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0);">
<ui:Label tabindex="-1" text="SpaceRace" display-tooltip-when-elided="true" name="title" style="font-size: 72px;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>
+10
View File
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 59e6af4d391d177a8910e7a8ab6e05e6
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
+1 -1
View File
@@ -19,7 +19,7 @@ MonoBehaviour:
m_Scale: 1
m_ReferenceDpi: 96
m_FallbackDpi: 96
m_ReferenceResolution: {x: 1200, y: 800}
m_ReferenceResolution: {x: 1440, y: 1080}
m_ScreenMatchMode: 0
m_Match: 0
m_SortingOrder: 0