1
This commit is contained in:
@@ -23,7 +23,7 @@ MonoBehaviour:
|
||||
m_RequireOpaqueTexture: 1
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_SupportsHDR: 0
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 0.6
|
||||
@@ -36,7 +36,7 @@ MonoBehaviour:
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 256
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsRenderingMode: 0
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 2048
|
||||
@@ -45,7 +45,7 @@ MonoBehaviour:
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 1024
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowDistance: 8
|
||||
m_ShadowCascadeCount: 4
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
@@ -82,12 +82,12 @@ MonoBehaviour:
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 0
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 0
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 2
|
||||
m_PrefilteringModeForwardPlus: 2
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
|
@@ -68,6 +68,10 @@ MonoBehaviour:
|
||||
_serializedList:
|
||||
- Key: 1
|
||||
Value: {fileID: 3094330708855449807, guid: 05ab35d27bb28ad49bc9c2b098b821ae, type: 3}
|
||||
sprintAnimations:
|
||||
_serializedList:
|
||||
- Key: 1
|
||||
Value: {fileID: 3094330708855449807, guid: 8e86aed4685f43b4f8fb6a9b306ea786, type: 3}
|
||||
knockedAnimations:
|
||||
_serializedList:
|
||||
- Key:
|
||||
|
135
Assets/Artists/Materials/material_guide_path.mat
Normal file
135
Assets/Artists/Materials/material_guide_path.mat
Normal file
@@ -0,0 +1,135 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1514724213852417610
|
||||
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: material_guide_path
|
||||
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, 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: 0}
|
||||
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: 0}
|
||||
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
|
||||
- _BlendOp: 0
|
||||
- _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
|
||||
- _SampleGI: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.047169685, g: 0.6014918, b: 1, a: 1}
|
||||
- _Color: {r: 0.047169663, g: 0.6014917, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
133
Assets/Artists/Materials/material_toon.mat
Normal file
133
Assets/Artists/Materials/material_toon.mat
Normal file
@@ -0,0 +1,133 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8685590349546997708
|
||||
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: material_toon
|
||||
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: 0}
|
||||
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: 0}
|
||||
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.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
@@ -158,7 +158,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -46.73, y: 444}
|
||||
m_AnchoredPosition: {x: -46.73, y: 279.93}
|
||||
m_SizeDelta: {x: 64, y: 64}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &322064946
|
||||
|
@@ -16,8 +16,11 @@ using Microsoft.Extensions.Hosting.Unity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Net.Like.Xue.Tokyo.GameService;
|
||||
using Net.Like.Xue.Tokyo.UX;
|
||||
using Net.Project.B.Dialogue;
|
||||
using Net.Project.B.Health;
|
||||
using Net.Project.B.Interaction;
|
||||
using Net.Project.B.Quest;
|
||||
using Net.Project.B.UX;
|
||||
using Net.Project.B.WorldNode;
|
||||
using Project.B.Animation;
|
||||
using Project.B.CharacterController;
|
||||
@@ -42,7 +45,7 @@ namespace Net.Like.Xue.Tokyo
|
||||
var source = new CancellationTokenSource();
|
||||
destroyCancellationToken.Register(source.Cancel);
|
||||
|
||||
var serviceCollection = new ServiceCollection();
|
||||
var serviceCollection = BITApp.ServiceCollection= new ServiceCollection();
|
||||
|
||||
serviceCollection.AddSingleton<IServiceCollection>(serviceCollection);
|
||||
|
||||
@@ -107,11 +110,20 @@ namespace Net.Like.Xue.Tokyo
|
||||
serviceCollection.AddSingleton<UXMenu>();
|
||||
serviceCollection.AddSingleton<UXConsole>();
|
||||
|
||||
serviceCollection.AddSingleton<UXDialogue>();
|
||||
|
||||
//生成玩家
|
||||
serviceCollection.AddSingleton<GameSpawnPlayerService>();
|
||||
|
||||
//任务
|
||||
serviceCollection.AddSingleton<IQuestService, QuestService>();
|
||||
|
||||
//对话
|
||||
serviceCollection.AddSingleton<IDialogueService, DialogueService>();
|
||||
serviceCollection.AddSingleton<DialogueMiddlewareNodeCanvasDialogueTree>();
|
||||
|
||||
//获取服务提供者
|
||||
var serviceProvider = serviceCollection.BuildServiceProvider();
|
||||
await using var serviceProvider = BITApp.ServiceProvider = serviceCollection.BuildServiceProvider();
|
||||
|
||||
if (serviceProvider is IDisposable disposable)
|
||||
{
|
||||
@@ -155,6 +167,10 @@ namespace Net.Like.Xue.Tokyo
|
||||
serviceProvider.GetRequiredService<WorldHighlightService>();
|
||||
|
||||
serviceProvider.GetRequiredService<UXConsole>();
|
||||
|
||||
serviceProvider.GetRequiredService<DialogueMiddlewareNodeCanvasDialogueTree>();
|
||||
|
||||
serviceProvider.GetRequiredService<UXDialogue>().Initialize(serviceProvider.GetRequiredService<UXHud>());
|
||||
|
||||
YooAssets.LoadAssetSync("MyShaderVariants").AssetObject.As<ShaderVariantCollection>().WarmUp();
|
||||
|
||||
|
37
Assets/Artists/Scripts/SetDayTime.cs
Normal file
37
Assets/Artists/Scripts/SetDayTime.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using NodeCanvas.Framework;
|
||||
using Pinwheel.Jupiter;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Net.Like.Xue.Tokyo
|
||||
{
|
||||
public class SetDayTime:MonoBehaviour
|
||||
{
|
||||
private JDayNightCycle _cycle;
|
||||
private void Start()
|
||||
{
|
||||
_cycle = GetComponent<JDayNightCycle>();
|
||||
Data.AddListener<float>("Time",OnSetTime);
|
||||
destroyCancellationToken.Register(Dispose);
|
||||
}
|
||||
private void Dispose()
|
||||
{
|
||||
Data.RemoveListender<float>("Time",OnSetTime);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
Data.Set("Time", _cycle.Time);
|
||||
}
|
||||
|
||||
private void OnSetTime(float obj)
|
||||
{
|
||||
_cycle.Time = obj;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,8 @@
|
||||
"GUID:c469c0b0902774247810f42d61a18bd7",
|
||||
"GUID:12c795c5ebfb7b245a0399e28b4015e8",
|
||||
"GUID:e527b3ce3106f974585be5134b6200e9",
|
||||
"GUID:d750d221812bb1d48baff92e6ef73e28"
|
||||
"GUID:d750d221812bb1d48baff92e6ef73e28",
|
||||
"GUID:b93d14745ae2c064fb21541ca62ad9de"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
@@ -2,10 +2,12 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.Mod;
|
||||
using BITKit.UX;
|
||||
using BITKit.WorldNode;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Net.Project.B.Interaction;
|
||||
using Net.Project.B.Quest;
|
||||
using Project.B.Map;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -18,15 +20,29 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
private readonly IGameMapService _gameMapService;
|
||||
private readonly IWorldInteractionService _interactionService;
|
||||
private readonly WorldInfoNodeService _worldInfoNodeService;
|
||||
public UXHud(IUXService uxService, IGameMapService gameMapService, IWorldInteractionService interactionService, WorldInfoNodeService worldInfoNodeService) : base(uxService)
|
||||
private readonly IQuestService _questService;
|
||||
public UXHud(IUXService uxService, IGameMapService gameMapService, IWorldInteractionService interactionService, WorldInfoNodeService worldInfoNodeService, IQuestService questService) : base(uxService)
|
||||
{
|
||||
_gameMapService = gameMapService;
|
||||
_interactionService = interactionService;
|
||||
_worldInfoNodeService = worldInfoNodeService;
|
||||
_questService = questService;
|
||||
|
||||
_gameMapService.OnMapChanged += OnMapChanged;
|
||||
|
||||
_interactionService.OnInteraction += OnInteraction;
|
||||
|
||||
|
||||
Data.AddListener<float>("Time",x=>
|
||||
{
|
||||
_timeSlider?.SetValueWithoutNotify(x);
|
||||
});
|
||||
|
||||
_questService.OnQuestCreatedOrUpdated +=(x,y,z)=>_questQueue.Enqueue(new(x,y,z));
|
||||
foreach (var (index,quest) in _questService.Quests)
|
||||
{
|
||||
_questQueue.Enqueue(new(quest,QuestState.Inactive,quest.CurrentState));
|
||||
}
|
||||
}
|
||||
|
||||
private void OnInteraction(object arg1, IWorldInteractable arg2, WorldInteractionProcess arg3, object arg4)
|
||||
@@ -58,9 +74,19 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
private VisualElement _miniPlayer;
|
||||
[UXBindPath("interaction-tips")]
|
||||
private Label _interactionTips;
|
||||
[UXBindPath("time-slider")]
|
||||
private Slider _timeSlider;
|
||||
[UXBindPath("quest-container")]
|
||||
private VisualElement _questContainer;
|
||||
|
||||
private Camera _minimapCamera;
|
||||
private Camera _mainCamera;
|
||||
|
||||
private VisualTreeAsset _questTemplate;
|
||||
|
||||
private readonly Queue<(IQuestData questData, QuestState oldQuestState, QuestState newQuestState)> _questQueue =
|
||||
new();
|
||||
|
||||
public override async UniTask EntryAsync()
|
||||
{
|
||||
await base.EntryAsync();
|
||||
@@ -72,6 +98,13 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
{
|
||||
UXService.Entry<UXMap>();
|
||||
});
|
||||
|
||||
_timeSlider.RegisterValueChangedCallback(x => { Data.Set("Time", x.newValue); });
|
||||
_questContainer.Clear();
|
||||
|
||||
_questTemplate =await ModService.LoadAsset<VisualTreeAsset>("ux_quest_template");
|
||||
|
||||
_timeSlider.value = Data.Get<float>("Time");
|
||||
}
|
||||
|
||||
public override void OnTick(float deltaTime)
|
||||
@@ -94,6 +127,17 @@ namespace Net.Like.Xue.Tokyo.UX
|
||||
|
||||
_miniPlayer.style.left = _minimapContainer.layout.width * point.x - _miniPlayer.layout.width / 2;
|
||||
_miniPlayer.style.top = _minimapContainer.layout.height * (1-point.y) - _miniPlayer.layout.height / 2;
|
||||
|
||||
|
||||
if (_questContainer is not null && _questTemplate!=null)
|
||||
{
|
||||
while (_questQueue.TryDequeue(out var quest))
|
||||
{
|
||||
var visualElement = _questContainer.Create(_questTemplate);
|
||||
visualElement.Get<Label>(0).text = quest.questData.Name;
|
||||
visualElement.Get<Label>(1).text = quest.questData.Description;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Animancer;
|
||||
@@ -58,6 +59,8 @@ namespace Net.Like.Xue.Tokyo
|
||||
_waitPlayerStart.TrySetResult(infoPlayerStart);
|
||||
}
|
||||
|
||||
public IReadOnlyDictionary<int, IEntity> Entities => _entities.ToDictionary(x => x.entity.Id, x => x.entity);
|
||||
|
||||
public async UniTask<IEntity> CreateAsync(string addressablePath)
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
|
@@ -26,3 +26,10 @@
|
||||
flex-grow: 1;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.dialogue-container Label {
|
||||
}
|
||||
|
||||
.dialogue-container Label:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
6
Assets/Artists/UX/ux_dialogue_choose_template.uxml
Normal file
6
Assets/Artists/UX/ux_dialogue_choose_template.uxml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||
<ui:Button parse-escape-sequences="true" display-tooltip-when-elided="true" name="Button-0" style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="[1]" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" style="width: 32px;" />
|
||||
<ui:Label tabindex="-1" text="选择A" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:Button>
|
||||
</ui:UXML>
|
7
Assets/Artists/UX/ux_dialogue_template.uxml
Normal file
7
Assets/Artists/UX/ux_dialogue_template.uxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<ui:VisualElement style="flex-direction: row; align-items: center;">
|
||||
<ui:Label tabindex="-1" text="Actor" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" />
|
||||
<ui:Label tabindex="-1" text=":" parse-escape-sequences="true" display-tooltip-when-elided="true" />
|
||||
<ui:Label tabindex="-1" text="Statement" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
@@ -1,12 +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">
|
||||
<ui:Template name="ux_quest_template" src="project://database/Assets/Artists/UX/ux_quest_template.uxml?fileID=9197481963319205126&guid=3e4b142e8b224ce42a5258702fcb6270&type=3#ux_quest_template" />
|
||||
<ui:Template name="ux_dialogue_template" src="project://database/Assets/Artists/UX/ux_dialogue_template.uxml?fileID=9197481963319205126&guid=af60a5419d14491468066d33d8806fc1&type=3#ux_dialogue_template" />
|
||||
<ui:Template name="ux_dialogue_choose_template" src="project://database/Assets/Artists/UX/ux_dialogue_choose_template.uxml?fileID=9197481963319205126&guid=0651c86a74198604da9d71321f73cbd5&type=3#ux_dialogue_choose_template" />
|
||||
<Style src="project://database/Assets/BITKit/Unity/UX/Common/Common.uss?fileID=7433441132597879392&guid=a3a69d3518fd02b489e721f3c5b0b539&type=3#Common" />
|
||||
<ui:VisualElement class="container-my-8" style="position: absolute; left: 32px; top: 32px;">
|
||||
<Style src="project://database/Assets/Artists/UX/Style.uss?fileID=7433441132597879392&guid=506d41b7c5d56a44bb5845e69055a5eb&type=3#Style" />
|
||||
<ui:VisualElement class="container-my-8" style="position: absolute; left: 32px; top: 32px; overflow: hidden;">
|
||||
<ui:VisualElement name="minimap-container" style="background-image: url("project://database/Assets/Artists/Materials/ux_minimap.renderTexture?fileID=8400000&guid=9a9e60eda7295fc47907b25d62d9dd79&type=2#ux_minimap"); width: 256px; height: 256px; background-color: rgba(0, 0, 0, 0.5); border-left-color: rgb(255, 255, 255); border-right-color: rgb(255, 255, 255); border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px;">
|
||||
<ui:VisualElement name="minimap-player" style="width: 32px; height: 32px; background-color: rgb(255, 255, 255); position: absolute; top: 97px; left: 64px; background-image: url("project://database/Assets/Artists/Arts/Avatars/avatar_player.jpg?fileID=2800000&guid=dc1a7b7a5cc9437438280932e8b541a0&type=3#avatar_player");" />
|
||||
</ui:VisualElement>
|
||||
<ui:Slider label="时间" high-value="24" name="time-slider" show-input-field="false" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement name="quest-container" style="position: absolute; top: 32px; right: 32px; background-color: rgba(0, 0, 0, 0.78);">
|
||||
<ui:Instance template="ux_quest_template" name="ux_quest_template" />
|
||||
</ui:VisualElement>
|
||||
<ui:Label tabindex="-1" text="互动" parse-escape-sequences="true" display-tooltip-when-elided="true" name="interaction-tips" class="flex-center tl" style="top: 32px; background-color: rgba(0, 0, 0, 0.78); padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px;" />
|
||||
<ui:VisualElement picking-mode="Ignore" class="root">
|
||||
<ui:VisualElement name="dialogue-choose-container">
|
||||
<ui:Instance template="ux_dialogue_choose_template" name="ux_dialogue_choose_template" />
|
||||
</ui:VisualElement>
|
||||
<ui:VisualElement style="margin-top: auto; margin-right: auto; margin-bottom: 16px; margin-left: auto; flex-direction: row; align-items: center; background-color: rgba(0, 0, 0, 0.78); width: 256px;">
|
||||
<ui:VisualElement style="width: 64px; height: 64px; background-image: url("project://database/Assets/Artists/Arts/Avatars/avatar_player.jpg?fileID=2800000&guid=dc1a7b7a5cc9437438280932e8b541a0&type=3#avatar_player");" />
|
||||
<ui:VisualElement style="flex-grow: 1; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px;">
|
||||
@@ -14,4 +25,8 @@
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
<ui:ScrollView picking-mode="Ignore" name="dialogue-container" class="flex-center dialogue-container" style="background-color: rgba(0, 0, 0, 0.78); border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; min-width: 512px; bottom: -25%; max-height: 300px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px;">
|
||||
<ui:Instance template="ux_dialogue_template" name="ux_dialogue_template" />
|
||||
<ui:Instance template="ux_dialogue_template" name="ux_dialogue_template" />
|
||||
</ui:ScrollView>
|
||||
</ui:UXML>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<Style src="project://database/Assets/BITKit/Unity/UX/Common/Common.uss?fileID=7433441132597879392&guid=a3a69d3518fd02b489e721f3c5b0b539&type=3#Common" />
|
||||
<ui:VisualElement class="root" style="background-image: url("project://database/Assets/Artists/Arts/Backgrounds/background_menu.jpg?fileID=21300000&guid=5abe2ac5974a6104fbf483cf5f3f19eb&type=3#background_menu"); background-color: rgb(0, 0, 0); -unity-background-image-tint-color: rgba(255, 255, 255, 0.32);" />
|
||||
<ui:VisualElement class="flex-center" style="min-width: 256px;">
|
||||
<ui:ProgressBar value="48.2" name="load-progress" style="background-color: rgba(255, 255, 255, 0.21); height: 4px; width: 512px;" />
|
||||
<ui:ProgressBar value="0.51" name="load-progress" high-value="1" style="background-color: rgba(255, 255, 255, 0.21); height: 4px; width: 512px;" />
|
||||
<ui:VisualElement style="flex-direction: row; justify-content: space-between;">
|
||||
<ui:Label tabindex="-1" text="map_tokyo" parse-escape-sequences="true" display-tooltip-when-elided="true" name="map-label" class="tl" />
|
||||
<ui:Label tabindex="-1" text="加载中..." parse-escape-sequences="true" display-tooltip-when-elided="true" name="load_step-label" />
|
||||
|
6
Assets/Artists/UX/ux_quest_template.uxml
Normal file
6
Assets/Artists/UX/ux_quest_template.uxml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements">
|
||||
<ui:VisualElement style="flex-grow: 1;">
|
||||
<ui:Label tabindex="-1" text="任务名称" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--0" class="tl" />
|
||||
<ui:Label tabindex="-1" text="任务描述" parse-escape-sequences="true" display-tooltip-when-elided="true" name="Label--1" />
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
Reference in New Issue
Block a user