implement main screen
This commit is contained in:
@@ -0,0 +1,231 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 3
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 0
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &100000
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 100004}
|
||||||
|
- component: {fileID: 100003}
|
||||||
|
- component: {fileID: 100001}
|
||||||
|
- component: {fileID: 100002}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &100001
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!114 &100002
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_RenderShadows: 1
|
||||||
|
m_RequiresDepthTextureOption: 2
|
||||||
|
m_RequiresOpaqueTextureOption: 2
|
||||||
|
m_CameraType: 0
|
||||||
|
m_Cameras: []
|
||||||
|
m_RendererIndex: -1
|
||||||
|
m_VolumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 1
|
||||||
|
m_VolumeTrigger: {fileID: 0}
|
||||||
|
m_RenderPostProcessing: 0
|
||||||
|
m_Antialiasing: 0
|
||||||
|
m_AntialiasingQuality: 2
|
||||||
|
m_StopNaN: 0
|
||||||
|
m_Dithering: 0
|
||||||
|
m_ClearDepth: 1
|
||||||
|
m_AllowXRRendering: 1
|
||||||
|
m_RequiresDepthTexture: 0
|
||||||
|
m_RequiresColorTexture: 0
|
||||||
|
m_Version: 2
|
||||||
|
--- !u!20 &100003
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0.031, g: 0.047, b: 0.059, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 34
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 0
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 0
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 0
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &100004
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &200000
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 200001}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameRoot
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &200001
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 200000}
|
||||||
|
serializedVersion: 2
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e4259fa62d854e27af3cc2a10fb210c8
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -84,8 +84,8 @@ LightmapSettings:
|
|||||||
m_PVRDenoiserTypeIndirect: 1
|
m_PVRDenoiserTypeIndirect: 1
|
||||||
m_PVRDenoiserTypeAO: 1
|
m_PVRDenoiserTypeAO: 1
|
||||||
m_PVRFilterTypeDirect: 0
|
m_PVRFilterTypeDirect: 0
|
||||||
m_PVRFilterTypeIndirect: 0
|
m_PVRFilterTypeIndirect: 5
|
||||||
m_PVRFilterTypeAO: 0
|
m_PVRFilterTypeAO: 2
|
||||||
m_PVREnvironmentMIS: 1
|
m_PVREnvironmentMIS: 1
|
||||||
m_PVRCulling: 1
|
m_PVRCulling: 1
|
||||||
m_PVRFilteringGaussRadiusDirect: 1
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
@@ -192,7 +192,7 @@ Camera:
|
|||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 2
|
m_ClearFlags: 2
|
||||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
m_BackGroundColor: {r: 0.031, g: 0.047, b: 0.059, a: 0}
|
||||||
m_projectionMatrixMode: 1
|
m_projectionMatrixMode: 1
|
||||||
m_GateFitMode: 2
|
m_GateFitMode: 2
|
||||||
m_FOVAxisMode: 0
|
m_FOVAxisMode: 0
|
||||||
@@ -232,6 +232,7 @@ Transform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 519420028}
|
m_GameObject: {fileID: 519420028}
|
||||||
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
@@ -240,7 +241,7 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &619394800
|
--- !u!1 &1100000000
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@@ -248,100 +249,24 @@ GameObject:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 619394802}
|
- component: {fileID: 1100000001}
|
||||||
- component: {fileID: 619394801}
|
- component: {fileID: 1100000002}
|
||||||
m_Layer: 0
|
- component: {fileID: 1100000003}
|
||||||
m_Name: Global Light 2D
|
m_Layer: 5
|
||||||
|
m_Name: MainMenuUI
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!114 &619394801
|
--- !u!4 &1100000001
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 619394800}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_ComponentVersion: 1
|
|
||||||
m_LightType: 4
|
|
||||||
m_BlendStyleIndex: 0
|
|
||||||
m_FalloffIntensity: 0.5
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_Intensity: 1
|
|
||||||
m_LightVolumeIntensity: 1
|
|
||||||
m_LightVolumeIntensityEnabled: 0
|
|
||||||
m_ApplyToSortingLayers: 00000000
|
|
||||||
m_LightCookieSprite: {fileID: 0}
|
|
||||||
m_DeprecatedPointLightCookieSprite: {fileID: 0}
|
|
||||||
m_LightOrder: 0
|
|
||||||
m_OverlapOperation: 0
|
|
||||||
m_NormalMapDistance: 3
|
|
||||||
m_NormalMapQuality: 2
|
|
||||||
m_UseNormalMap: 0
|
|
||||||
m_ShadowIntensityEnabled: 0
|
|
||||||
m_ShadowIntensity: 0.75
|
|
||||||
m_ShadowVolumeIntensityEnabled: 0
|
|
||||||
m_ShadowVolumeIntensity: 0.75
|
|
||||||
m_Vertices:
|
|
||||||
- position: {x: 0.9985302, y: 0.9985302, z: 0}
|
|
||||||
color: {r: 0.70710677, g: 0.70710677, b: 0, a: 0}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: 0.9985302, y: 0.9985302, z: 0}
|
|
||||||
color: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: -0.9985302, y: 0.9985302, z: 0}
|
|
||||||
color: {r: -0.70710677, g: 0.70710677, b: 0, a: 0}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: -0.9985302, y: 0.9985302, z: 0}
|
|
||||||
color: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: -0.99853003, y: -0.9985304, z: 0}
|
|
||||||
color: {r: -0.70710665, g: -0.7071069, b: 0, a: 0}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: -0.99853003, y: -0.9985304, z: 0}
|
|
||||||
color: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: 0.99853003, y: -0.9985304, z: 0}
|
|
||||||
color: {r: 0.70710665, g: -0.7071069, b: 0, a: 0}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: 0.99853003, y: -0.9985304, z: 0}
|
|
||||||
color: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
- position: {x: 0, y: 0, z: 0}
|
|
||||||
color: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
uv: {x: 0, y: 0}
|
|
||||||
m_Triangles: 030001000800020000000100030002000100050003000800040002000300050004000300070005000800060004000500070006000500010007000800000006000700010000000700
|
|
||||||
m_LocalBounds:
|
|
||||||
m_Center: {x: 0, y: -0.00000011920929, z: 0}
|
|
||||||
m_Extent: {x: 0.9985302, y: 0.99853027, z: 0}
|
|
||||||
m_PointLightInnerAngle: 360
|
|
||||||
m_PointLightOuterAngle: 360
|
|
||||||
m_PointLightInnerRadius: 0
|
|
||||||
m_PointLightOuterRadius: 1
|
|
||||||
m_ShapeLightParametricSides: 5
|
|
||||||
m_ShapeLightParametricAngleOffset: 0
|
|
||||||
m_ShapeLightParametricRadius: 1
|
|
||||||
m_ShapeLightFalloffSize: 0.5
|
|
||||||
m_ShapeLightFalloffOffset: {x: 0, y: 0}
|
|
||||||
m_ShapePath:
|
|
||||||
- {x: -0.5, y: -0.5, z: 0}
|
|
||||||
- {x: 0.5, y: -0.5, z: 0}
|
|
||||||
- {x: 0.5, y: 0.5, z: 0}
|
|
||||||
- {x: -0.5, y: 0.5, z: 0}
|
|
||||||
--- !u!4 &619394802
|
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 619394800}
|
m_GameObject: {fileID: 1100000000}
|
||||||
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
@@ -350,3 +275,34 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1100000002
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1100000000}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_PanelSettings: {fileID: 11400000, guid: 7d68bd7978394c8295debbd403a39d80, type: 2}
|
||||||
|
m_ParentUI: {fileID: 0}
|
||||||
|
sourceAsset: {fileID: 9197481963319205126, guid: a720a33f8c2b4dfe9d8197772dc0ab21, type: 3}
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!114 &1100000003
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1100000000}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 27a7f29e93cb4c55beac52f1e32a1bf5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
monospaceFont: {fileID: 0}
|
||||||
|
featuredUnitPanel:
|
||||||
|
featuredUnits: []
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
namespace KernelPanic.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides scene navigation entry points for the runtime shell.
|
||||||
|
/// </summary>
|
||||||
|
public static class SceneLoader
|
||||||
|
{
|
||||||
|
public const string MainMenuSceneName = "MainMenuScene";
|
||||||
|
public const string GameSceneName = "GameScene";
|
||||||
|
|
||||||
|
public static void LoadMainMenu()
|
||||||
|
{
|
||||||
|
LoadScene(MainMenuSceneName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LoadGame()
|
||||||
|
{
|
||||||
|
LoadScene(GameSceneName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Static for now because menu navigation has no instance state; a loading-screen service can replace this hook later.
|
||||||
|
private static void LoadScene(string sceneName)
|
||||||
|
{
|
||||||
|
// TODO: Route async progress into a loading screen once the UI shell has one.
|
||||||
|
SceneManager.LoadSceneAsync(sceneName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d860bbf8e7f4df2a91e2e1e9892d904
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -13,6 +13,8 @@ namespace KernelPanic.Data
|
|||||||
[SerializeField] private string displayName;
|
[SerializeField] private string displayName;
|
||||||
[SerializeField] private Language primaryLanguage;
|
[SerializeField] private Language primaryLanguage;
|
||||||
[SerializeField] private Language secondaryLanguage;
|
[SerializeField] private Language secondaryLanguage;
|
||||||
|
[SerializeField] private string passiveName;
|
||||||
|
[SerializeField] private Color accentColor = new(0.36f, 1f, 0.57f);
|
||||||
[SerializeField] private int baseUptime;
|
[SerializeField] private int baseUptime;
|
||||||
[SerializeField] private int baseRam;
|
[SerializeField] private int baseRam;
|
||||||
[SerializeField] private int baseCyclesPerTurn;
|
[SerializeField] private int baseCyclesPerTurn;
|
||||||
@@ -22,6 +24,8 @@ namespace KernelPanic.Data
|
|||||||
public string DisplayName => displayName;
|
public string DisplayName => displayName;
|
||||||
public Language PrimaryLanguage => primaryLanguage;
|
public Language PrimaryLanguage => primaryLanguage;
|
||||||
public Language SecondaryLanguage => secondaryLanguage;
|
public Language SecondaryLanguage => secondaryLanguage;
|
||||||
|
public string PassiveName => passiveName;
|
||||||
|
public Color AccentColor => accentColor;
|
||||||
public int BaseUptime => baseUptime;
|
public int BaseUptime => baseUptime;
|
||||||
public int BaseRam => baseRam;
|
public int BaseRam => baseRam;
|
||||||
public int BaseCyclesPerTurn => baseCyclesPerTurn;
|
public int BaseCyclesPerTurn => baseCyclesPerTurn;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ namespace KernelPanic.Meta
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class GachaService
|
public sealed class GachaService
|
||||||
{
|
{
|
||||||
|
public int PullTokens => 0; // TODO: Replace with the real pull-token wallet when that meta system exists.
|
||||||
|
|
||||||
public GachaPullResult PerformPull(EntropyWallet wallet, int cost)
|
public GachaPullResult PerformPull(EntropyWallet wallet, int cost)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace KernelPanic.Meta
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides optional live-event banner copy for shell surfaces.
|
||||||
|
/// </summary>
|
||||||
|
public interface IEventBannerSource
|
||||||
|
{
|
||||||
|
EventBannerContent GetBanner();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Describes an optional event banner message and remaining duration.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class EventBannerContent
|
||||||
|
{
|
||||||
|
public EventBannerContent(string text, TimeSpan? remainingTime)
|
||||||
|
{
|
||||||
|
Text = text;
|
||||||
|
RemainingTime = remainingTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Text { get; }
|
||||||
|
public TimeSpan? RemainingTime { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 542dd3144a914ea5b1e0c0e21db5ec6b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84a74d1de7c84009a2cf84394e8a9fa2
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace KernelPanic.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Contains cosmetic terminal boot-log copy for the main menu shell.
|
||||||
|
/// </summary>
|
||||||
|
public static class BootLogCopy
|
||||||
|
{
|
||||||
|
public static readonly string[] Lines =
|
||||||
|
{
|
||||||
|
"[ 0.000000] kernel-panic: booting userland shell",
|
||||||
|
"[ 0.071004] cpu: isolating run scheduler",
|
||||||
|
"[ 0.184331] entropy: wallet device mounted readonly",
|
||||||
|
"[ 0.264700] tty1: spawning command menu",
|
||||||
|
"[ 0.391226] units: probing installed distros",
|
||||||
|
"[ 0.447801] collection: no render pass requested",
|
||||||
|
"[ 0.521332] gacha: token api unavailable",
|
||||||
|
"[ 0.684012] events: banner source disconnected",
|
||||||
|
"[ 0.812445] ui: reduced motion preference loaded",
|
||||||
|
"[ 1.000000] shell: ready"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e05527a70e234c16af2f9089012721b8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using KernelPanic.Data;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
|
||||||
|
namespace KernelPanic.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Renders the main menu's neofetch-style featured unit panel.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public sealed class FeaturedUnitPanel
|
||||||
|
{
|
||||||
|
private const string EmptyAccent = "5cff91";
|
||||||
|
private const string EmptyAscii = " _\n | |\n ___| |__\n / __| '_ \\\n \\__ \\ | | |\n |___/_| |_|";
|
||||||
|
|
||||||
|
[SerializeField] private List<DistroDefinition> featuredUnits = new();
|
||||||
|
|
||||||
|
private VisualElement panel;
|
||||||
|
private Label titleLabel;
|
||||||
|
private Label asciiLabel;
|
||||||
|
private Label unitNameLabel;
|
||||||
|
private Label languagesLabel;
|
||||||
|
private Label passiveLabel;
|
||||||
|
private Label bestWaveLabel;
|
||||||
|
private Label emptyTitleLabel;
|
||||||
|
private Label emptyHintLabel;
|
||||||
|
private VisualElement populatedState;
|
||||||
|
private VisualElement emptyState;
|
||||||
|
private int selectedIndex;
|
||||||
|
|
||||||
|
public void Bind(VisualElement root)
|
||||||
|
{
|
||||||
|
panel = root.Q<VisualElement>("FeaturedUnitPanel");
|
||||||
|
titleLabel = root.Q<Label>("FeaturedUnitTitle");
|
||||||
|
asciiLabel = root.Q<Label>("FeaturedUnitAscii");
|
||||||
|
unitNameLabel = root.Q<Label>("FeaturedUnitName");
|
||||||
|
languagesLabel = root.Q<Label>("FeaturedUnitLanguages");
|
||||||
|
passiveLabel = root.Q<Label>("FeaturedUnitPassive");
|
||||||
|
bestWaveLabel = root.Q<Label>("FeaturedUnitBestWave");
|
||||||
|
emptyTitleLabel = root.Q<Label>("FeaturedUnitEmptyTitle");
|
||||||
|
emptyHintLabel = root.Q<Label>("FeaturedUnitEmptyHint");
|
||||||
|
populatedState = root.Q<VisualElement>("FeaturedUnitPopulatedState");
|
||||||
|
emptyState = root.Q<VisualElement>("FeaturedUnitEmptyState");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Refresh()
|
||||||
|
{
|
||||||
|
if (featuredUnits == null || featuredUnits.Count == 0)
|
||||||
|
{
|
||||||
|
ShowEmptyState();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedIndex = Mathf.Clamp(selectedIndex, 0, featuredUnits.Count - 1);
|
||||||
|
ShowUnit(featuredUnits[selectedIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SelectNext()
|
||||||
|
{
|
||||||
|
if (featuredUnits == null || featuredUnits.Count < 2)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedIndex = (selectedIndex + 1) % featuredUnits.Count;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowEmptyState()
|
||||||
|
{
|
||||||
|
populatedState.AddToClassList("hidden");
|
||||||
|
emptyState.RemoveFromClassList("hidden");
|
||||||
|
|
||||||
|
titleLabel.text = "neofetch";
|
||||||
|
emptyTitleLabel.text = "no units installed";
|
||||||
|
emptyHintLabel.text = "run: curl gacha.sh | sh";
|
||||||
|
SetAccent(EmptyAccent);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowUnit(DistroDefinition unit)
|
||||||
|
{
|
||||||
|
populatedState.RemoveFromClassList("hidden");
|
||||||
|
emptyState.AddToClassList("hidden");
|
||||||
|
|
||||||
|
string displayName = string.IsNullOrWhiteSpace(unit.DisplayName) ? unit.name : unit.DisplayName;
|
||||||
|
titleLabel.text = displayName;
|
||||||
|
asciiLabel.text = EmptyAscii; // TODO: Replace with unit-specific ASCII copy when unit presentation data exists.
|
||||||
|
unitNameLabel.text = displayName;
|
||||||
|
languagesLabel.text = $"{unit.PrimaryLanguage} / {unit.SecondaryLanguage}";
|
||||||
|
passiveLabel.text = string.IsNullOrWhiteSpace(unit.PassiveName) ? "--" : unit.PassiveName;
|
||||||
|
bestWaveLabel.text = "--"; // TODO: Bind best-wave stats from SaveService when stats exist.
|
||||||
|
SetAccent(ColorUtility.ToHtmlStringRGB(unit.AccentColor));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetAccent(string htmlColor)
|
||||||
|
{
|
||||||
|
string color = $"#{htmlColor}";
|
||||||
|
Color parsedColor = ColorUtility.TryParseHtmlString(color, out Color parsed) ? parsed : Color.green;
|
||||||
|
panel.style.borderTopColor = new StyleColor(parsedColor);
|
||||||
|
panel.style.borderRightColor = new StyleColor(parsedColor);
|
||||||
|
panel.style.borderBottomColor = new StyleColor(parsedColor);
|
||||||
|
panel.style.borderLeftColor = new StyleColor(parsedColor);
|
||||||
|
titleLabel.style.color = new StyleColor(parsedColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c7f7ef4e16694ed9bd746278b0ddc4d8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,454 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using KernelPanic.Core;
|
||||||
|
using KernelPanic.Meta;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.TextCore.Text;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
using UnityEditor;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace KernelPanic.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Binds the main menu terminal UI document and routes command activation between panels.
|
||||||
|
/// </summary>
|
||||||
|
[RequireComponent(typeof(UIDocument))]
|
||||||
|
public sealed class MainMenuController : MonoBehaviour
|
||||||
|
{
|
||||||
|
private const string HiddenClassName = "hidden";
|
||||||
|
private const string SelectedClassName = "selected";
|
||||||
|
private const string CursorOnClassName = "cursor-on";
|
||||||
|
private const float BootIntroSeconds = 1.5f;
|
||||||
|
private static bool bootIntroPlayed;
|
||||||
|
|
||||||
|
[SerializeField] private FontAsset monospaceFont; // TODO: Assign a real monospace FontAsset when typography assets exist.
|
||||||
|
[SerializeField] private FeaturedUnitPanel featuredUnitPanel = new();
|
||||||
|
|
||||||
|
private readonly List<CommandMenuEntry> commandEntries = new();
|
||||||
|
private UIDocument document;
|
||||||
|
private VisualElement root;
|
||||||
|
private VisualElement shellRoot;
|
||||||
|
private VisualElement bootIntroPanel;
|
||||||
|
private VisualElement mainMenuPanel;
|
||||||
|
private VisualElement collectionPanel;
|
||||||
|
private VisualElement gachaPanel;
|
||||||
|
private VisualElement settingsPanel;
|
||||||
|
private VisualElement eventBanner;
|
||||||
|
private VisualElement backgroundLogLayer;
|
||||||
|
private Label appIdLabel;
|
||||||
|
private Label entropyLabel;
|
||||||
|
private Label pullTokensLabel;
|
||||||
|
private Label titleCursorLabel;
|
||||||
|
private Label promptCursorLabel;
|
||||||
|
private Label bootIntroLogLabel;
|
||||||
|
private Label backgroundLogLabel;
|
||||||
|
private Button collectionBackButton;
|
||||||
|
private Button gachaBackButton;
|
||||||
|
private Button settingsBackButton;
|
||||||
|
private EntropyWallet wallet;
|
||||||
|
private GachaService gachaService;
|
||||||
|
private IEventBannerSource eventBannerSource;
|
||||||
|
private int selectedCommandIndex;
|
||||||
|
private float backgroundScrollOffset;
|
||||||
|
private float bootIntroElapsed;
|
||||||
|
private int bootIntroCharacterCount;
|
||||||
|
private bool suppressNextClick;
|
||||||
|
private string bootIntroCopy;
|
||||||
|
private IVisualElementScheduledItem blinkSchedule;
|
||||||
|
private IVisualElementScheduledItem backgroundSchedule;
|
||||||
|
private IVisualElementScheduledItem bootIntroSchedule;
|
||||||
|
|
||||||
|
public void Initialize(EntropyWallet initializedWallet)
|
||||||
|
{
|
||||||
|
wallet = initializedWallet ?? new EntropyWallet();
|
||||||
|
RefreshCurrencyReadouts();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
document = GetComponent<UIDocument>();
|
||||||
|
gachaService = new GachaService();
|
||||||
|
Initialize(new EntropyWallet()); // TODO: Replace with persistent wallet service composition.
|
||||||
|
BindElements();
|
||||||
|
BindCommandEntries();
|
||||||
|
RegisterCommandEntryCallbacks();
|
||||||
|
featuredUnitPanel.Bind(root);
|
||||||
|
ApplyOptionalFont();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
RegisterCallbacks();
|
||||||
|
root.Focus();
|
||||||
|
shellRoot.EnableInClassList("reduced-motion", UIPreferences.ReducedMotion);
|
||||||
|
RefreshStaticText();
|
||||||
|
RefreshCurrencyReadouts();
|
||||||
|
RefreshEventBanner();
|
||||||
|
featuredUnitPanel.Refresh();
|
||||||
|
SelectCommand(0);
|
||||||
|
ShowMainMenu();
|
||||||
|
StartAmbientSchedules();
|
||||||
|
PlayBootIntroIfNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
UnregisterCallbacks();
|
||||||
|
blinkSchedule?.Pause();
|
||||||
|
backgroundSchedule?.Pause();
|
||||||
|
bootIntroSchedule?.Pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindElements()
|
||||||
|
{
|
||||||
|
root = document.rootVisualElement;
|
||||||
|
shellRoot = root.Q<VisualElement>("ShellRoot");
|
||||||
|
bootIntroPanel = root.Q<VisualElement>("BootIntroPanel");
|
||||||
|
mainMenuPanel = root.Q<VisualElement>("MainMenuPanel");
|
||||||
|
collectionPanel = root.Q<VisualElement>("CollectionPanel");
|
||||||
|
gachaPanel = root.Q<VisualElement>("GachaPanel");
|
||||||
|
settingsPanel = root.Q<VisualElement>("SettingsPanel");
|
||||||
|
eventBanner = root.Q<VisualElement>("EventBanner");
|
||||||
|
backgroundLogLayer = root.Q<VisualElement>("BackgroundLogLayer");
|
||||||
|
|
||||||
|
appIdLabel = root.Q<Label>("AppIdLabel");
|
||||||
|
entropyLabel = root.Q<Label>("EntropyLabel");
|
||||||
|
pullTokensLabel = root.Q<Label>("PullTokensLabel");
|
||||||
|
titleCursorLabel = root.Q<Label>("TitleCursorLabel");
|
||||||
|
promptCursorLabel = root.Q<Label>("PromptCursorLabel");
|
||||||
|
bootIntroLogLabel = root.Q<Label>("BootIntroLogLabel");
|
||||||
|
backgroundLogLabel = root.Q<Label>("BackgroundLogLabel");
|
||||||
|
|
||||||
|
collectionBackButton = root.Q<Button>("CollectionBackButton");
|
||||||
|
gachaBackButton = root.Q<Button>("GachaBackButton");
|
||||||
|
settingsBackButton = root.Q<Button>("SettingsBackButton");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindCommandEntries()
|
||||||
|
{
|
||||||
|
commandEntries.Clear();
|
||||||
|
commandEntries.Add(new CommandMenuEntry(root.Q<VisualElement>("CommandStartRun"), HandleStartRunClicked));
|
||||||
|
commandEntries.Add(new CommandMenuEntry(root.Q<VisualElement>("CommandCollection"), ShowCollection));
|
||||||
|
commandEntries.Add(new CommandMenuEntry(root.Q<VisualElement>("CommandGacha"), ShowGacha));
|
||||||
|
commandEntries.Add(new CommandMenuEntry(root.Q<VisualElement>("CommandSettings"), ShowSettings));
|
||||||
|
commandEntries.Add(new CommandMenuEntry(root.Q<VisualElement>("CommandQuit"), HandleQuitClicked));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyOptionalFont()
|
||||||
|
{
|
||||||
|
if (monospaceFont == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
root.style.unityFontDefinition = new StyleFontDefinition(monospaceFont);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RegisterCallbacks()
|
||||||
|
{
|
||||||
|
root.RegisterCallback<KeyDownEvent>(HandleKeyDown);
|
||||||
|
root.RegisterCallback<PointerDownEvent>(HandlePointerDown);
|
||||||
|
collectionBackButton.clicked += ShowMainMenu;
|
||||||
|
gachaBackButton.clicked += ShowMainMenu;
|
||||||
|
settingsBackButton.clicked += ShowMainMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UnregisterCallbacks()
|
||||||
|
{
|
||||||
|
root.UnregisterCallback<KeyDownEvent>(HandleKeyDown);
|
||||||
|
root.UnregisterCallback<PointerDownEvent>(HandlePointerDown);
|
||||||
|
collectionBackButton.clicked -= ShowMainMenu;
|
||||||
|
gachaBackButton.clicked -= ShowMainMenu;
|
||||||
|
settingsBackButton.clicked -= ShowMainMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshStaticText()
|
||||||
|
{
|
||||||
|
appIdLabel.text = $"kernel-panic v{Application.version} - tty1";
|
||||||
|
backgroundLogLabel.text = BuildBackgroundLog();
|
||||||
|
bootIntroCopy = string.Join("\n", BootLogCopy.Lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RegisterCommandEntryCallbacks()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < commandEntries.Count; i++)
|
||||||
|
{
|
||||||
|
int index = i;
|
||||||
|
commandEntries[i].Row.RegisterCallback<PointerEnterEvent>(_ => SelectCommand(index));
|
||||||
|
commandEntries[i].Row.RegisterCallback<ClickEvent>(_ => HandleCommandClicked(index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshCurrencyReadouts()
|
||||||
|
{
|
||||||
|
if (entropyLabel == null || pullTokensLabel == null || gachaService == null || wallet == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
entropyLabel.text = $"entropy={wallet.Balance}";
|
||||||
|
pullTokensLabel.text = $"pulls={gachaService.PullTokens}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshEventBanner()
|
||||||
|
{
|
||||||
|
EventBannerContent banner = eventBannerSource?.GetBanner();
|
||||||
|
if (banner == null || string.IsNullOrWhiteSpace(banner.Text))
|
||||||
|
{
|
||||||
|
eventBanner.AddToClassList(HiddenClassName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
eventBanner.RemoveFromClassList(HiddenClassName);
|
||||||
|
root.Q<Label>("EventBannerLabel").text = banner.RemainingTime.HasValue
|
||||||
|
? $"{banner.Text} {banner.RemainingTime.Value:g}"
|
||||||
|
: banner.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartAmbientSchedules()
|
||||||
|
{
|
||||||
|
if (UIPreferences.ReducedMotion)
|
||||||
|
{
|
||||||
|
titleCursorLabel.AddToClassList(CursorOnClassName);
|
||||||
|
promptCursorLabel.AddToClassList(CursorOnClassName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cursorVisible = true;
|
||||||
|
blinkSchedule = root.schedule.Execute(() =>
|
||||||
|
{
|
||||||
|
cursorVisible = !cursorVisible;
|
||||||
|
titleCursorLabel.EnableInClassList(CursorOnClassName, cursorVisible);
|
||||||
|
promptCursorLabel.EnableInClassList(CursorOnClassName, cursorVisible);
|
||||||
|
}).Every(480);
|
||||||
|
|
||||||
|
backgroundSchedule = root.schedule.Execute(() =>
|
||||||
|
{
|
||||||
|
backgroundScrollOffset = (backgroundScrollOffset + 0.35f) % 80f;
|
||||||
|
backgroundLogLayer.style.translate = new Translate(0, -backgroundScrollOffset, 0);
|
||||||
|
}).Every(33);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PlayBootIntroIfNeeded()
|
||||||
|
{
|
||||||
|
if (bootIntroPlayed || UIPreferences.ReducedMotion)
|
||||||
|
{
|
||||||
|
CompleteBootIntro();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bootIntroPlayed = true;
|
||||||
|
bootIntroElapsed = 0f;
|
||||||
|
bootIntroCharacterCount = 0;
|
||||||
|
bootIntroLogLabel.text = string.Empty;
|
||||||
|
bootIntroPanel.RemoveFromClassList(HiddenClassName);
|
||||||
|
shellRoot.AddToClassList("boot-hidden");
|
||||||
|
|
||||||
|
bootIntroSchedule = root.schedule.Execute(UpdateBootIntro).Every(16);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateBootIntro()
|
||||||
|
{
|
||||||
|
bootIntroElapsed += 0.016f;
|
||||||
|
int targetCount = Mathf.Clamp(Mathf.CeilToInt(bootIntroCopy.Length * (bootIntroElapsed / BootIntroSeconds)), 0, bootIntroCopy.Length);
|
||||||
|
if (targetCount != bootIntroCharacterCount)
|
||||||
|
{
|
||||||
|
bootIntroCharacterCount = targetCount;
|
||||||
|
bootIntroLogLabel.text = bootIntroCopy.Substring(0, bootIntroCharacterCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bootIntroElapsed >= BootIntroSeconds)
|
||||||
|
{
|
||||||
|
CompleteBootIntro();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompleteBootIntro()
|
||||||
|
{
|
||||||
|
bootIntroSchedule?.Pause();
|
||||||
|
bootIntroPanel.AddToClassList(HiddenClassName);
|
||||||
|
shellRoot.RemoveFromClassList("boot-hidden");
|
||||||
|
shellRoot.AddToClassList("boot-visible");
|
||||||
|
root.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool SkipBootIntro()
|
||||||
|
{
|
||||||
|
if (bootIntroPanel.ClassListContains(HiddenClassName))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CompleteBootIntro();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleKeyDown(KeyDownEvent evt)
|
||||||
|
{
|
||||||
|
if (SkipBootIntro())
|
||||||
|
{
|
||||||
|
evt.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evt.keyCode == KeyCode.UpArrow)
|
||||||
|
{
|
||||||
|
SelectCommand(selectedCommandIndex - 1);
|
||||||
|
evt.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evt.keyCode == KeyCode.DownArrow)
|
||||||
|
{
|
||||||
|
SelectCommand(selectedCommandIndex + 1);
|
||||||
|
evt.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter || evt.keyCode == KeyCode.Space)
|
||||||
|
{
|
||||||
|
ActivateCommand(selectedCommandIndex);
|
||||||
|
evt.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evt.keyCode == KeyCode.Tab)
|
||||||
|
{
|
||||||
|
featuredUnitPanel.SelectNext();
|
||||||
|
evt.StopPropagation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int digitIndex = GetDigitCommandIndex(evt.keyCode);
|
||||||
|
if (digitIndex >= 0)
|
||||||
|
{
|
||||||
|
SelectCommand(digitIndex);
|
||||||
|
ActivateCommand(digitIndex);
|
||||||
|
evt.StopPropagation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandlePointerDown(PointerDownEvent evt)
|
||||||
|
{
|
||||||
|
root.Focus();
|
||||||
|
suppressNextClick = SkipBootIntro();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int GetDigitCommandIndex(KeyCode keyCode)
|
||||||
|
{
|
||||||
|
return keyCode switch
|
||||||
|
{
|
||||||
|
KeyCode.Alpha1 or KeyCode.Keypad1 => 0,
|
||||||
|
KeyCode.Alpha2 or KeyCode.Keypad2 => 1,
|
||||||
|
KeyCode.Alpha3 or KeyCode.Keypad3 => 2,
|
||||||
|
KeyCode.Alpha4 or KeyCode.Keypad4 => 3,
|
||||||
|
KeyCode.Alpha5 or KeyCode.Keypad5 => 4,
|
||||||
|
_ => -1
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SelectCommand(int index)
|
||||||
|
{
|
||||||
|
selectedCommandIndex = (index + commandEntries.Count) % commandEntries.Count;
|
||||||
|
for (int i = 0; i < commandEntries.Count; i++)
|
||||||
|
{
|
||||||
|
commandEntries[i].SetSelected(i == selectedCommandIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ActivateCommand(int index)
|
||||||
|
{
|
||||||
|
commandEntries[index].Activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleCommandClicked(int index)
|
||||||
|
{
|
||||||
|
if (suppressNextClick)
|
||||||
|
{
|
||||||
|
suppressNextClick = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActivateCommand(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleStartRunClicked()
|
||||||
|
{
|
||||||
|
SceneLoader.LoadGame();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleQuitClicked()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
EditorApplication.isPlaying = false;
|
||||||
|
#else
|
||||||
|
Application.Quit();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowMainMenu()
|
||||||
|
{
|
||||||
|
ShowPanel(mainMenuPanel);
|
||||||
|
root.Focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowCollection()
|
||||||
|
{
|
||||||
|
ShowPanel(collectionPanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowGacha()
|
||||||
|
{
|
||||||
|
ShowPanel(gachaPanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowSettings()
|
||||||
|
{
|
||||||
|
ShowPanel(settingsPanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Replace this direct toggle with a screen-stack/router when menu flows need history or transitions.
|
||||||
|
private void ShowPanel(VisualElement activePanel)
|
||||||
|
{
|
||||||
|
mainMenuPanel.EnableInClassList(HiddenClassName, mainMenuPanel != activePanel);
|
||||||
|
collectionPanel.EnableInClassList(HiddenClassName, collectionPanel != activePanel);
|
||||||
|
gachaPanel.EnableInClassList(HiddenClassName, gachaPanel != activePanel);
|
||||||
|
settingsPanel.EnableInClassList(HiddenClassName, settingsPanel != activePanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string BuildBackgroundLog()
|
||||||
|
{
|
||||||
|
string block = string.Join("\n", BootLogCopy.Lines);
|
||||||
|
return $"{block}\n{block}\n{block}\n{block}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class CommandMenuEntry
|
||||||
|
{
|
||||||
|
private readonly Label cursor;
|
||||||
|
private readonly Action action;
|
||||||
|
|
||||||
|
public CommandMenuEntry(VisualElement row, Action action)
|
||||||
|
{
|
||||||
|
Row = row;
|
||||||
|
this.action = action;
|
||||||
|
cursor = row.Q<Label>(className: "command-cursor");
|
||||||
|
}
|
||||||
|
|
||||||
|
public VisualElement Row { get; }
|
||||||
|
|
||||||
|
public void SetSelected(bool selected)
|
||||||
|
{
|
||||||
|
Row.EnableInClassList(SelectedClassName, selected);
|
||||||
|
cursor.visible = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Activate()
|
||||||
|
{
|
||||||
|
action.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 27a7f29e93cb4c55beac52f1e32a1bf5
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace KernelPanic.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Stores UI-level accessibility preferences for runtime presentation.
|
||||||
|
/// </summary>
|
||||||
|
public static class UIPreferences
|
||||||
|
{
|
||||||
|
public static bool ReducedMotion { get; set; } // TODO: Persist with settings once settings storage exists.
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a1efef5d7a1b485493c2f30d64644898
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 486932f365394f218bf9173e0e677afb
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
|
<ui:VisualElement name="CollectionPanel" class="sub-panel hidden">
|
||||||
|
<ui:Label text="COLLECTION" class="screen-title" />
|
||||||
|
<ui:ScrollView name="CollectionScrollView" class="stub-scroll">
|
||||||
|
<!-- TODO: Render owned distros and cards here when collection data exists. -->
|
||||||
|
<ui:VisualElement name="CollectionContent" class="collection-content" />
|
||||||
|
</ui:ScrollView>
|
||||||
|
<ui:Button name="CollectionBackButton" text="Back" class="terminal-button back-button" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b39165b71c3e4bef9656e93e236530c1
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
|
<ui:VisualElement name="GachaPanel" class="sub-panel hidden">
|
||||||
|
<ui:Label text="GACHA" class="screen-title" />
|
||||||
|
<ui:VisualElement name="GachaContent" class="stub-box">
|
||||||
|
<!-- TODO: Render summon options and results here when gacha logic exists. -->
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:Button name="GachaBackButton" text="Back" class="terminal-button back-button" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ec1119ad0fcf4b7282c4e65a3c7f186d
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,356 @@
|
|||||||
|
:root {
|
||||||
|
--kp-bg: #050807;
|
||||||
|
--kp-panel: #09100d;
|
||||||
|
--kp-primary: #5cff91;
|
||||||
|
--kp-primary-dim: #2f7a4d;
|
||||||
|
--kp-muted: #7f9b8a;
|
||||||
|
--kp-border: #1d3b2a;
|
||||||
|
--kp-hover: #102018;
|
||||||
|
--kp-amber: #ffbf5c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-root {
|
||||||
|
flex-grow: 1;
|
||||||
|
background-color: var(--kp-bg);
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.background-log-layer {
|
||||||
|
position: absolute;
|
||||||
|
left: 24px;
|
||||||
|
right: 24px;
|
||||||
|
top: 0;
|
||||||
|
bottom: -120px;
|
||||||
|
opacity: 0.07;
|
||||||
|
}
|
||||||
|
|
||||||
|
.background-log {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
white-space: normal;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boot-intro {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 48px;
|
||||||
|
background-color: var(--kp-bg);
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boot-intro-log {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 15px;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shell-root {
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: 18px 24px 16px 24px;
|
||||||
|
opacity: 1;
|
||||||
|
transition-property: opacity;
|
||||||
|
transition-duration: 220ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boot-hidden {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boot-visible {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reduced-motion {
|
||||||
|
transition-duration: 0ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar,
|
||||||
|
.footer-bar {
|
||||||
|
min-height: 34px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-left-width: 0;
|
||||||
|
border-right-width: 0;
|
||||||
|
border-top-width: 0;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-bottom-color: var(--kp-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bar {
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-top-color: var(--kp-border);
|
||||||
|
border-bottom-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-right,
|
||||||
|
.prompt-row,
|
||||||
|
.title-row {
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-text,
|
||||||
|
.footer-muted,
|
||||||
|
.tagline,
|
||||||
|
.muted-text {
|
||||||
|
color: var(--kp-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.currency-text {
|
||||||
|
color: var(--kp-amber);
|
||||||
|
margin-right: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-panel {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-row {
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
padding-top: 52px;
|
||||||
|
padding-bottom: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-column {
|
||||||
|
flex-grow: 1;
|
||||||
|
min-width: 470px;
|
||||||
|
padding-right: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-title {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 54px;
|
||||||
|
-unity-font-style: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blink-cursor {
|
||||||
|
color: transparent;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cursor-on {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tagline {
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 34px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-list {
|
||||||
|
max-width: 720px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-row {
|
||||||
|
min-height: 44px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
border-left-width: 2px;
|
||||||
|
border-left-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-row:hover,
|
||||||
|
.command-row.selected {
|
||||||
|
background-color: var(--kp-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-row.selected {
|
||||||
|
border-left-color: var(--kp-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-cursor {
|
||||||
|
width: 22px;
|
||||||
|
color: var(--kp-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-text {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 19px;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.command-description {
|
||||||
|
color: var(--kp-muted);
|
||||||
|
-unity-text-align: middle-right;
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-panel {
|
||||||
|
width: 430px;
|
||||||
|
min-height: 330px;
|
||||||
|
padding: 18px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-color: var(--kp-primary);
|
||||||
|
border-right-color: var(--kp-primary);
|
||||||
|
border-top-color: var(--kp-primary);
|
||||||
|
border-bottom-color: var(--kp-primary);
|
||||||
|
background-color: var(--kp-panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-title,
|
||||||
|
.screen-title {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 24px;
|
||||||
|
-unity-font-style: bold;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-empty {
|
||||||
|
flex-grow: 1;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-title {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 20px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.featured-populated {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ascii-art {
|
||||||
|
width: 150px;
|
||||||
|
color: var(--kp-primary);
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unit-readout {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kv-row {
|
||||||
|
flex-direction: row;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kv-key {
|
||||||
|
width: 88px;
|
||||||
|
color: var(--kp-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.kv-value {
|
||||||
|
flex-grow: 1;
|
||||||
|
color: var(--kp-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.event-banner {
|
||||||
|
min-height: 34px;
|
||||||
|
justify-content: center;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-color: var(--kp-amber);
|
||||||
|
border-right-color: var(--kp-amber);
|
||||||
|
border-top-color: var(--kp-amber);
|
||||||
|
border-bottom-color: var(--kp-amber);
|
||||||
|
}
|
||||||
|
|
||||||
|
.event-banner-text {
|
||||||
|
color: var(--kp-amber);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-panel {
|
||||||
|
flex-grow: 1;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stub-scroll,
|
||||||
|
.stub-box {
|
||||||
|
width: 560px;
|
||||||
|
height: 300px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-color: var(--kp-border);
|
||||||
|
border-right-color: var(--kp-border);
|
||||||
|
border-top-color: var(--kp-border);
|
||||||
|
border-bottom-color: var(--kp-border);
|
||||||
|
background-color: var(--kp-panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
.collection-content {
|
||||||
|
min-height: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-button {
|
||||||
|
height: 42px;
|
||||||
|
margin-top: 24px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-color: var(--kp-primary);
|
||||||
|
border-right-color: var(--kp-primary);
|
||||||
|
border-top-color: var(--kp-primary);
|
||||||
|
border-bottom-color: var(--kp-primary);
|
||||||
|
background-color: var(--kp-panel);
|
||||||
|
color: var(--kp-primary);
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terminal-button:hover {
|
||||||
|
background-color: var(--kp-primary);
|
||||||
|
color: var(--kp-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-row {
|
||||||
|
width: 420px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 16px;
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-left-color: var(--kp-border);
|
||||||
|
border-right-color: var(--kp-border);
|
||||||
|
border-top-color: var(--kp-border);
|
||||||
|
border-bottom-color: var(--kp-border);
|
||||||
|
background-color: var(--kp-panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled-row {
|
||||||
|
opacity: 0.55;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-label,
|
||||||
|
.settings-toggle,
|
||||||
|
.prompt-text {
|
||||||
|
color: var(--kp-primary);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bce4c6ca6c1d455e99443cc2d7a2593b
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
disableValidation: 0
|
||||||
|
unsupportedSelectorAction: 0
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
|
<Style src="MainMenu.uss" />
|
||||||
|
<ui:Template name="CollectionScreen" src="CollectionScreen.uxml" />
|
||||||
|
<ui:Template name="GachaScreen" src="GachaScreen.uxml" />
|
||||||
|
<ui:Template name="SettingsScreen" src="SettingsScreen.uxml" />
|
||||||
|
<ui:VisualElement name="Root" class="terminal-root" focusable="true">
|
||||||
|
<ui:VisualElement name="BackgroundLogLayer" class="background-log-layer" pickingMode="Ignore">
|
||||||
|
<ui:Label name="BackgroundLogLabel" class="background-log" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:VisualElement name="BootIntroPanel" class="boot-intro">
|
||||||
|
<ui:Label name="BootIntroLogLabel" class="boot-intro-log" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:VisualElement name="ShellRoot" class="shell-root">
|
||||||
|
<ui:VisualElement class="status-bar">
|
||||||
|
<ui:Label name="AppIdLabel" class="status-text" />
|
||||||
|
<ui:VisualElement class="status-right">
|
||||||
|
<ui:Label name="EntropyLabel" class="currency-text" />
|
||||||
|
<ui:Label name="PullTokensLabel" class="currency-text" />
|
||||||
|
<ui:Label text="uid=1000(player)" class="status-text" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:VisualElement name="MainMenuPanel" class="main-panel">
|
||||||
|
<ui:VisualElement class="content-row">
|
||||||
|
<ui:VisualElement class="command-column">
|
||||||
|
<ui:VisualElement class="title-row">
|
||||||
|
<ui:Label text="KERNEL PANIC" class="terminal-title" />
|
||||||
|
<ui:Label name="TitleCursorLabel" text="█" class="blink-cursor" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:Label text="roguelike kernel shell / unstable userspace" class="tagline" />
|
||||||
|
|
||||||
|
<ui:VisualElement class="command-list">
|
||||||
|
<ui:VisualElement name="CommandStartRun" class="command-row">
|
||||||
|
<ui:Label text=">" class="command-cursor" />
|
||||||
|
<ui:Label text="./start_run" class="command-text" />
|
||||||
|
<ui:Label text="new run" class="command-description" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="CommandCollection" class="command-row">
|
||||||
|
<ui:Label text=">" class="command-cursor" />
|
||||||
|
<ui:Label text="ls ~/collection" class="command-text" />
|
||||||
|
<ui:Label text="units + cards" class="command-description" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="CommandGacha" class="command-row">
|
||||||
|
<ui:Label text=">" class="command-cursor" />
|
||||||
|
<ui:Label text="curl gacha.sh | sh" class="command-text" />
|
||||||
|
<ui:Label text="summon" class="command-description" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="CommandSettings" class="command-row">
|
||||||
|
<ui:Label text=">" class="command-cursor" />
|
||||||
|
<ui:Label text="dpkg-reconfigure" class="command-text" />
|
||||||
|
<ui:Label text="settings" class="command-description" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="CommandQuit" class="command-row">
|
||||||
|
<ui:Label text=">" class="command-cursor" />
|
||||||
|
<ui:Label text="shutdown -h now" class="command-text" />
|
||||||
|
<ui:Label text="quit" class="command-description" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:VisualElement name="FeaturedUnitPanel" class="featured-panel">
|
||||||
|
<ui:Label name="FeaturedUnitTitle" text="neofetch" class="featured-title" />
|
||||||
|
<ui:VisualElement name="FeaturedUnitEmptyState" class="featured-empty">
|
||||||
|
<ui:Label name="FeaturedUnitEmptyTitle" text="no units installed" class="empty-title" />
|
||||||
|
<ui:Label name="FeaturedUnitEmptyHint" text="run: curl gacha.sh | sh" class="muted-text" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement name="FeaturedUnitPopulatedState" class="featured-populated hidden">
|
||||||
|
<ui:Label name="FeaturedUnitAscii" class="ascii-art" />
|
||||||
|
<ui:VisualElement class="unit-readout">
|
||||||
|
<ui:VisualElement class="kv-row">
|
||||||
|
<ui:Label text="unit" class="kv-key" />
|
||||||
|
<ui:Label name="FeaturedUnitName" class="kv-value" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement class="kv-row">
|
||||||
|
<ui:Label text="lang" class="kv-key" />
|
||||||
|
<ui:Label name="FeaturedUnitLanguages" class="kv-value" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement class="kv-row">
|
||||||
|
<ui:Label text="passive" class="kv-key" />
|
||||||
|
<ui:Label name="FeaturedUnitPassive" class="kv-value" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:VisualElement class="kv-row">
|
||||||
|
<ui:Label text="best wave" class="kv-key" />
|
||||||
|
<ui:Label name="FeaturedUnitBestWave" class="kv-value" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:Instance template="CollectionScreen" />
|
||||||
|
<ui:Instance template="GachaScreen" />
|
||||||
|
<ui:Instance template="SettingsScreen" />
|
||||||
|
|
||||||
|
<ui:VisualElement name="EventBanner" class="event-banner hidden">
|
||||||
|
<ui:Label name="EventBannerLabel" class="event-banner-text" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
|
||||||
|
<ui:VisualElement class="footer-bar">
|
||||||
|
<ui:VisualElement class="prompt-row">
|
||||||
|
<ui:Label text="player@mainframe:~$ " class="prompt-text" />
|
||||||
|
<ui:Label name="PromptCursorLabel" text="█" class="blink-cursor" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:Label text="daily seed: --------" class="footer-muted" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a720a33f8c2b4dfe9d8197772dc0ab21
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
%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: 19101, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_Name: MainMenuPanelSettings
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
themeUss: {fileID: -4733365628477956816, guid: 50d8f7f949f77429c91ec4d834d2afb2, type: 3}
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_WorldSpaceLayer: 0
|
||||||
|
m_ScaleMode: 1
|
||||||
|
m_ReferenceSpritePixelsPerUnit: 100
|
||||||
|
m_PixelsPerUnit: 100
|
||||||
|
m_Scale: 1
|
||||||
|
m_ReferenceDpi: 96
|
||||||
|
m_FallbackDpi: 96
|
||||||
|
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_Match: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_BindingLogLevel: 0
|
||||||
|
m_ClearDepthStencil: 1
|
||||||
|
m_ClearColor: 0
|
||||||
|
m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
m_VertexBudget: 0
|
||||||
|
m_DynamicAtlasSettings:
|
||||||
|
m_MinAtlasSize: 64
|
||||||
|
m_MaxAtlasSize: 4096
|
||||||
|
m_MaxSubTextureSize: 64
|
||||||
|
m_ActiveFilters: -1
|
||||||
|
m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
textSettings: {fileID: 0}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7d68bd7978394c8295debbd403a39d80
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||||
|
<ui:VisualElement name="SettingsPanel" class="sub-panel hidden">
|
||||||
|
<ui:Label text="SETTINGS" class="screen-title" />
|
||||||
|
<ui:VisualElement class="settings-row disabled-row">
|
||||||
|
<ui:Label text="Audio" class="settings-label" />
|
||||||
|
<ui:Toggle name="AudioToggle" text="TODO" enabled="false" class="settings-toggle" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
<ui:Button name="SettingsBackButton" text="Back" class="terminal-button back-button" />
|
||||||
|
</ui:VisualElement>
|
||||||
|
</ui:UXML>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cb8ce38e52cb45179ea337b19fa99043
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
@import url("unity-theme://default");
|
||||||
|
VisualElement {}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 50d8f7f949f77429c91ec4d834d2afb2
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
disableValidation: 0
|
||||||
@@ -6,7 +6,10 @@ EditorBuildSettings:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes:
|
m_Scenes:
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/SampleScene.unity
|
path: Assets/Scenes/MainMenuScene.unity
|
||||||
guid: 8c9cfa26abfee488c85f1582747f6a02
|
guid: 8c9cfa26abfee488c85f1582747f6a02
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/GameScene.unity
|
||||||
|
guid: e4259fa62d854e27af3cc2a10fb210c8
|
||||||
m_configObjects:
|
m_configObjects:
|
||||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||||
|
|||||||
Reference in New Issue
Block a user