Merge branch 'feature/yingli' into 'develop'

Feature/yingli

See merge request aibis-dream/aibis-dream!510
This commit is contained in:
2025-07-18 11:33:48 +00:00
23 changed files with 7397 additions and 934 deletions
@@ -1,83 +0,0 @@
using UnityEditor;
using UnityEditor.Animations;
using UnityEngine;
using UnityEngine.UIElements;
public class SimpleCustomEditor : EditorWindow
{
[MenuItem("Window/UI Toolkit/MyCustomEditor")]
public static void ShowExample()
{
SimpleCustomEditor wnd = GetWindow<SimpleCustomEditor>();
wnd.titleContent = new GUIContent("MyCustomEditor");
}
[SerializeField]
private VisualTreeAsset m_UXMLTree = default;
private int m_ClickCount = 0;
private const string m_ButtonPrefix = "button";
public void CreateGUI()
{
// Each editor window contains a root VisualElement object
VisualElement root = rootVisualElement;
// VisualElements objects can contain other VisualElement following a tree hierarchy.
Label label = new Label("These controls were created using C# code.");
root.Add(label);
Button button = new Button();
button.name = "button3";
button.text = "This is button3.";
root.Add(button);
Toggle toggle = new Toggle();
toggle.name = "toggle3";
toggle.label = "Number?";
root.Add(toggle);
// Instantiate UXML created automatically which is set as the default VisualTreeAsset.
root.Add(m_UXMLTree.Instantiate());
// Import UXML created manually.
var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Editor/UXML/Editor Simple/SimpleCustomEditor_uxml.uxml");
VisualElement labelFromUXML_uxml = visualTree.Instantiate();
root.Add(labelFromUXML_uxml);
//Call the event handler
SetupButtonHandler();
}
//Functions as the event handlers for your button click and number counts
private void SetupButtonHandler()
{
VisualElement root = rootVisualElement;
var buttons = root.Query<Button>();
buttons.ForEach(RegisterHandler);
}
private void RegisterHandler(Button button)
{
button.RegisterCallback<ClickEvent>(PrintClickMessage);
}
private void PrintClickMessage(ClickEvent evt)
{
VisualElement root = rootVisualElement;
++m_ClickCount;
//Because of the names we gave the buttons and toggles, we can use the
//button name to find the toggle name.
Button button = evt.currentTarget as Button;
string buttonNumber = button.name.Substring(m_ButtonPrefix.Length);
string toggleName = "toggle" + buttonNumber;
Toggle toggle = root.Q<Toggle>(toggleName);
Debug.Log("Button was clicked!" +
(toggle.value ? " Count: " + m_ClickCount : ""));
}
}
@@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 0465714253b841b4284cdd223157ac53
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- m_ViewDataDictionary: {instanceID: 0}
- m_UXMLTree: {fileID: 9197481963319205126, guid: 070bb0363fb0b0f4c85a9c529a716276, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,5 +0,0 @@
<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:Label text="These controls were created in UI Builder." />
<ui:Button text="This is button1" name="button1"/>
<ui:Toggle label="Number?" name="toggle1"/>
</ui:UXML>
@@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 070bb0363fb0b0f4c85a9c529a716276
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
@@ -1,5 +0,0 @@
<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:Label text="These controls were created with UXML." />
<ui:Button text="This is button2" name="button2"/>
<ui:Toggle label="Number?" name="toggle2"/>
</ui:UXML>
@@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 208c3b2cf9e22504689a630983c0b2bc
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
Binary file not shown.
+820
View File
@@ -0,0 +1,820 @@
fileFormatVersion: 2
guid: 9b52cf9be273e354a8dc0fd420bc20ef
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: b2a9591990af98743ba3ff7cf1000886, type: 3}
textureImporterSettings:
alphaSource: 1
mipMapMode: 0
enableMipMap: 1
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
convertToNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
swizzle: 50462976
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
nPOTScale: 1
sRGBTexture: 1
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 215
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 0
flipbookColumns: 0
ignorePngGamma: 0
cookieMode: 0
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
normalMap: 0
textureFormat: 0
maxTextureSize: 0
lightmap: 0
compressionQuality: 0
linearTexture: 0
grayScaleToAlpha: 0
rGBM: 0
cubemapConvolutionSteps: 0
cubemapConvolutionExponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
spriteImportData:
- name:
originalName:
pivot: {x: 0, y: 0}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
spriteID:
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 0, y: 0}
spritePosition: {x: 0, y: 0}
mosaicSpriteImportData: []
rigSpriteImportData:
- name: "\u56FE\u5C42 12 \u526F\u672C"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1159
y: 6469
width: 374
height: 237
spriteID: 9515321a4644dfa49a4b55407c189931
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1159, y: 6469}
spritePosition: {x: 1607, y: 1319}
- name: "\u56FE\u5C42 12 \u526F\u672C 2"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1159
y: 6714
width: 374
height: 237
spriteID: db2a119553b4c2043a7e682aa59c7dfe
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1159, y: 6714}
spritePosition: {x: 1607, y: 1319}
- name: "\u56FE\u5C42 14"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1159
y: 6959
width: 374
height: 237
spriteID: bee91e83e6db6704f9ba79e52e2a8ad5
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1159, y: 6959}
spritePosition: {x: 1607, y: 1319}
- name: "\u56FE\u5C42 15 \u526F\u672C"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 1802
width: 432
height: 113
spriteID: 8832338b6f6211d48812280eb3710c97
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 1802}
spritePosition: {x: 1811, y: 1545}
- name: "\u56FE\u5C42 17"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3948
y: 1110
width: 95
height: 271
spriteID: 6b5a059862c7702438377fe7a6c8809b
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3948, y: 1110}
spritePosition: {x: 1989, y: 1464}
- name: "\u56FE\u5C42 16"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1582
y: 6127
width: 151
height: 265
spriteID: b0188dd6735040c438c1958defee674d
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1582, y: 6127}
spritePosition: {x: 1967, y: 1462}
- name: "\u56FE\u5C42 15 \u62F7\u8D1D"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 386
width: 424
height: 354
spriteID: 24dfc24cdab45c941a6d0040e20f66c4
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 386}
spritePosition: {x: 1855, y: 1411}
- name: "\u56FE\u5C42 15"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 748
width: 424
height: 354
spriteID: 2ebc222b554c1d145abec965e371f83d
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 748}
spritePosition: {x: 1855, y: 1411}
- name: "\u56FE\u5C42 14 \u526F\u672C 2"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 1455
width: 412
height: 339
spriteID: 1e13af62bde8c954a9fab65e0e8833a2
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 1455}
spritePosition: {x: 1853, y: 1422}
- name: " \u706B\u5C71\u5C4F\u5E55"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 4
width: 471
height: 374
spriteID: ee36218809d43a747993280925103e08
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 4}
spritePosition: {x: 1794, y: 1411}
- name: "\u56FE\u5C42 18"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1159
y: 7204
width: 450
height: 94
spriteID: 347f10c3ce4f38541b5216807e8a177c
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1159, y: 7204}
spritePosition: {x: 1771, y: 1569}
- name: "\u56FE\u5C42 14 \u526F\u672C 3"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 3523
y: 1110
width: 417
height: 337
spriteID: ea2d883727447644e930d444567a1eb0
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 3523, y: 1110}
spritePosition: {x: 1811, y: 1450}
- name: "\u56FE\u5C42 14 \u526F\u672C 4"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1159
y: 6127
width: 415
height: 334
spriteID: 8ab27f1f4edbcf547a0f683bfee12c85
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1159, y: 6127}
spritePosition: {x: 1809, y: 1452}
- name: "\u52A8\u4F5C \u62AC\u5934\u63A8\u9500"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 4
y: 4060
width: 1613
height: 2059
spriteID: 6dc25cc47c3600a488ecb2e098eb7f77
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 4, y: 4060}
spritePosition: {x: 1404, y: 30}
- name: "\u52A8\u4F5C \u4F4E\u5934\u63A8\u9500 "
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 4
y: 4
width: 1732
height: 2089
spriteID: 3eae70401b286cb4891b7d683f2bd543
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 4, y: 4}
spritePosition: {x: 1285, y: 0}
- name: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1744
y: 4
width: 1771
height: 1978
spriteID: f3a61a9b6cf2242428b02e08ea7e40d3
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1744, y: 4}
spritePosition: {x: 864, y: 54}
- name: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C\u5782\u624B"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 4
y: 6127
width: 1147
height: 1978
spriteID: 7ae20e84b68c17a4eacbd895b184bcd6
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 4, y: 6127}
spritePosition: {x: 1488, y: 54}
- name: "\u52A8\u4F5C \u706B\u5C71\u6478\u5934"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 4
y: 2101
width: 1715
height: 1951
spriteID: 527c69ca8ef0c7442bded846a7817849
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 4, y: 2101}
spritePosition: {x: 1217, y: 39}
- name: "\u52A8\u4F5C \u706B\u5C71\u5BF9\u624B\u6307"
originalName:
pivot: {x: 0.5, y: 0.5}
alignment: 0
border: {x: 0, y: 0, z: 0, w: 0}
rect:
serializedVersion: 2
x: 1744
y: 1990
width: 1014
height: 1871
spriteID: a96325fa37cfd464b867400225ef09b0
spriteBone: []
spriteOutline: []
vertices: []
spritePhysicsOutline: []
indices:
edges: []
tessellationDetail: 0
uvTransform: {x: 1744, y: 1990}
spritePosition: {x: 1415, y: 120}
characterData:
bones: []
parts: []
dimension: {x: 0, y: 0}
characterGroups: []
pivot: {x: 0, y: 0}
boneReadOnly: 0
sharedRigSpriteImportData: []
sharedRigCharacterData:
bones: []
parts: []
dimension: {x: 0, y: 0}
characterGroups: []
pivot: {x: 0, y: 0}
boneReadOnly: 0
platformSettings:
- name: DefaultTexturePlatform
overridden: 0
ignorePlatformSupport: 0
maxTextureSize: 16384
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
forceMaximumCompressionQuality_BC6H_BC7: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
androidETC2FallbackOverride: 0
- name: Standalone
overridden: 0
ignorePlatformSupport: 0
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
forceMaximumCompressionQuality_BC6H_BC7: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
androidETC2FallbackOverride: 0
- name: Server
overridden: 0
ignorePlatformSupport: 0
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
forceMaximumCompressionQuality_BC6H_BC7: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
androidETC2FallbackOverride: 0
- name: Android
overridden: 0
ignorePlatformSupport: 0
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
forceMaximumCompressionQuality_BC6H_BC7: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
androidETC2FallbackOverride: 0
- name: WebGL
overridden: 0
ignorePlatformSupport: 0
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
forceMaximumCompressionQuality_BC6H_BC7: 0
crunchedCompression: 0
allowsAlphaSplitting: 0
androidETC2FallbackOverride: 0
mosaicLayers: 1
characterMode: 1
documentPivot: {x: 0, y: 0}
documentAlignment: 0
importHiddenLayers: 1
layerMappingOption: 2
generatePhysicsShape: 0
paperDollMode: 0
keepDupilcateSpriteName: 1
skeletonAssetReferenceID:
padding: 4
spriteSizeExpand: 0
spriteCategoryList:
categories: []
spritePackingTag:
resliceFromLayer: 0
mosaicPSDLayers: []
rigPSDLayers:
- name: "\u8868\u60C5\u706B \u5C71\u5BF9\u624B\u6307"
spriteName:
isGroup: 1
parentIndex: -1
spriteID: 85930151189412e4fa2a552ed83b6ab1
layerID: 78
mosaicPosition: {x: 0, y: 0}
flatten: 0
isImported: 0
isVisible: 0
- name: "\u56FE\u5C42 12 \u526F\u672C"
spriteName: "\u56FE\u5C42 12 \u526F\u672C"
isGroup: 0
parentIndex: 0
spriteID: 9515321a4644dfa49a4b55407c189931
layerID: 77
mosaicPosition: {x: 1159, y: 6469}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 12 \u526F\u672C 2"
spriteName: "\u56FE\u5C42 12 \u526F\u672C 2"
isGroup: 0
parentIndex: 0
spriteID: db2a119553b4c2043a7e682aa59c7dfe
layerID: 76
mosaicPosition: {x: 1159, y: 6714}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 14"
spriteName: "\u56FE\u5C42 14"
isGroup: 0
parentIndex: 0
spriteID: bee91e83e6db6704f9ba79e52e2a8ad5
layerID: 75
mosaicPosition: {x: 1159, y: 6959}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u8868\u60C5 \u706B\u5C71\u6478\u5934"
spriteName:
isGroup: 1
parentIndex: -1
spriteID: efe5584139715ce40a5c5a5cb71c6f5b
layerID: 95
mosaicPosition: {x: 0, y: 0}
flatten: 0
isImported: 0
isVisible: 0
- name: "\u56FE\u5C42 15 \u526F\u672C"
spriteName: "\u56FE\u5C42 15 \u526F\u672C"
isGroup: 0
parentIndex: 4
spriteID: 8832338b6f6211d48812280eb3710c97
layerID: 94
mosaicPosition: {x: 3523, y: 1802}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 17"
spriteName: "\u56FE\u5C42 17"
isGroup: 0
parentIndex: 4
spriteID: 6b5a059862c7702438377fe7a6c8809b
layerID: 93
mosaicPosition: {x: 3948, y: 1110}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 16"
spriteName: "\u56FE\u5C42 16"
isGroup: 0
parentIndex: 4
spriteID: b0188dd6735040c438c1958defee674d
layerID: 92
mosaicPosition: {x: 1582, y: 6127}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 15 \u62F7\u8D1D"
spriteName: "\u56FE\u5C42 15 \u62F7\u8D1D"
isGroup: 0
parentIndex: 4
spriteID: 24dfc24cdab45c941a6d0040e20f66c4
layerID: 154
mosaicPosition: {x: 3523, y: 386}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 15"
spriteName: "\u56FE\u5C42 15"
isGroup: 0
parentIndex: 4
spriteID: 2ebc222b554c1d145abec965e371f83d
layerID: 89
mosaicPosition: {x: 3523, y: 748}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u56FE\u5C42 14 \u526F\u672C 2"
spriteName: "\u56FE\u5C42 14 \u526F\u672C 2"
isGroup: 0
parentIndex: 4
spriteID: 1e13af62bde8c954a9fab65e0e8833a2
layerID: 91
mosaicPosition: {x: 3523, y: 1455}
flatten: 0
isImported: 1
isVisible: 1
- name: " \u706B\u5C71\u5C4F\u5E55"
spriteName: " \u706B\u5C71\u5C4F\u5E55"
isGroup: 0
parentIndex: 4
spriteID: ee36218809d43a747993280925103e08
layerID: 121
mosaicPosition: {x: 3523, y: 4}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u8868\u60C5 \u6807\u51C6\u52A8\u4F5C"
spriteName:
isGroup: 1
parentIndex: -1
spriteID: fb334ecb302a36c4e99a0e3e4d4ce2cb
layerID: 100
mosaicPosition: {x: 0, y: 0}
flatten: 0
isImported: 0
isVisible: 0
- name: "\u56FE\u5C42 18"
spriteName: "\u56FE\u5C42 18"
isGroup: 0
parentIndex: 12
spriteID: 347f10c3ce4f38541b5216807e8a177c
layerID: 99
mosaicPosition: {x: 1159, y: 7204}
flatten: 0
isImported: 1
isVisible: 0
- name: "\u56FE\u5C42 14 \u526F\u672C 3"
spriteName: "\u56FE\u5C42 14 \u526F\u672C 3"
isGroup: 0
parentIndex: 12
spriteID: ea2d883727447644e930d444567a1eb0
layerID: 98
mosaicPosition: {x: 3523, y: 1110}
flatten: 0
isImported: 1
isVisible: 0
- name: "\u56FE\u5C42 14 \u526F\u672C 4"
spriteName: "\u56FE\u5C42 14 \u526F\u672C 4"
isGroup: 0
parentIndex: 12
spriteID: 8ab27f1f4edbcf547a0f683bfee12c85
layerID: 97
mosaicPosition: {x: 1159, y: 6127}
flatten: 0
isImported: 1
isVisible: 0
- name: "\u52A8\u4F5C \u62AC\u5934\u63A8\u9500"
spriteName: "\u52A8\u4F5C \u62AC\u5934\u63A8\u9500"
isGroup: 0
parentIndex: -1
spriteID: 6dc25cc47c3600a488ecb2e098eb7f77
layerID: 65
mosaicPosition: {x: 4, y: 4060}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u52A8\u4F5C \u4F4E\u5934\u63A8\u9500 "
spriteName: "\u52A8\u4F5C \u4F4E\u5934\u63A8\u9500 "
isGroup: 0
parentIndex: -1
spriteID: 3eae70401b286cb4891b7d683f2bd543
layerID: 64
mosaicPosition: {x: 4, y: 4}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C"
spriteName: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C"
isGroup: 0
parentIndex: -1
spriteID: f3a61a9b6cf2242428b02e08ea7e40d3
layerID: 137
mosaicPosition: {x: 1744, y: 4}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C\u5782\u624B"
spriteName: "\u52A8\u4F5C \u6807\u51C6\u52A8\u4F5C\u5782\u624B"
isGroup: 0
parentIndex: -1
spriteID: 7ae20e84b68c17a4eacbd895b184bcd6
layerID: 136
mosaicPosition: {x: 4, y: 6127}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u52A8\u4F5C \u706B\u5C71\u6478\u5934"
spriteName: "\u52A8\u4F5C \u706B\u5C71\u6478\u5934"
isGroup: 0
parentIndex: -1
spriteID: 527c69ca8ef0c7442bded846a7817849
layerID: 104
mosaicPosition: {x: 4, y: 2101}
flatten: 0
isImported: 1
isVisible: 1
- name: "\u52A8\u4F5C \u706B\u5C71\u5BF9\u624B\u6307"
spriteName: "\u52A8\u4F5C \u706B\u5C71\u5BF9\u624B\u6307"
isGroup: 0
parentIndex: -1
spriteID: a96325fa37cfd464b867400225ef09b0
layerID: 61
mosaicPosition: {x: 1744, y: 1990}
flatten: 0
isImported: 1
isVisible: 1
sharedRigPSDLayers: []
pSDLayerImportSetting: []
importFileNodeState: 1
platformSettingsDirtyTick: 638884635855909017
spriteSizeExpandChanged: 0
generateGOHierarchy: 1
textureAssetName:
prefabAssetName:
spriteLibAssetName:
skeletonAssetName:
secondarySpriteTextures: []
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 349305695e512ac4aa4fa63995c55809 guid: 9f05345d8a673944ca52721d16d8fab1
folderAsset: yes PrefabImporter:
DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
assetBundleName: assetBundleName:
File diff suppressed because it is too large Load Diff
@@ -86,14 +86,14 @@ namespace AibisDream.FixSystem
available = isAvailable; available = isAvailable;
} }
public void PlugIn() public virtual void PlugIn()
{ {
if (DialogController.Instance) if (DialogController.Instance)
// 然后触发Yarn节点 // 然后触发Yarn节点
DialogController.Instance.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统发热" : data.PlugInNodeName); DialogController.Instance.StartDialogNode(_bodyModuleSystem.inHotErr ? "系统发热" : data.PlugInNodeName);
} }
public void PlugOut() public virtual void PlugOut()
{ {
} }
@@ -0,0 +1,36 @@
using UnityEngine;
namespace AibisDream.FixSystem
{
public class MoleModule : BodyModule
{
// 重写PlugIn和PlugOut就好了
public override void PlugIn()
{
}
public override void PlugOut()
{
}
#region
public void StartFlicker()
{
}
public void StopFlicker()
{
}
public void LightOn(Color color)
{
}
public void LightOff()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c9904428998e4f968f13f9ce62ced67e
timeCreated: 1752145784
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 89f1717ba9914921a9e036c7ec328b2a
timeCreated: 1752037163
@@ -0,0 +1,28 @@
using System;
using UnityEngine;
namespace AibisDream.FixSystem
{
[CreateAssetMenu(fileName = "WhackMoldData", menuName = "Level Data/WhackMoldData")]
public class WhackMoleData : ScriptableObject
{
public WhackMoleNode[] nodes;
}
[Serializable]
public struct WhackMoleNode
{
public WhackMoleCommand command;
public string moduleName;
public float flickerTime;
public float lightOnTime;
}
public enum WhackMoleCommand
{
SingleModuleLightOn,
MultipleModuleLightOn,
SingleModuleColorOn,
MultipleModuleColorOn
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 75a50c7f91b54e07857c2b21e2e843c9
timeCreated: 1752127517
@@ -0,0 +1,225 @@
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Events;
namespace AibisDream.FixSystem
{
public class WhackMoleHandler
{
private readonly MonoBehaviour _mono;
private AbsWhackMoleNodeHandler _nodeHandler;
public event Action OnGameEnd;
private WhackMoleHandler(MonoBehaviour mono)
{
_mono = mono;
}
public void OnPlugIn(string moduleName)
{
_nodeHandler.OnPlugIn(moduleName);
}
private void Handle()
{
_nodeHandler.onHandleEnd.AddListener(OnHandleEnd);
_mono.StartCoroutine(_nodeHandler.Handle());
}
private void OnHandleEnd(bool isSuccess)
{
if (isSuccess)
{
// TODO 进入下一关
_nodeHandler.onHandleEnd.RemoveAllListeners();
if (_nodeHandler.nextHandler != null)
{
_nodeHandler = _nodeHandler.nextHandler;
Handle();
}
else
{
OnGameEnd?.Invoke();
}
}
else
{
// TODO 进入失败结局
OnGameEnd?.Invoke();
}
}
public static WhackMoleHandler Create(WhackMoleData data, MonoBehaviour mono)
{
var res = new WhackMoleHandler(mono);
AbsWhackMoleNodeHandler lastHandler = null;
foreach (var node in data.nodes)
{
var handler = CreateNodeHandler(node);
res._nodeHandler ??= handler;
if (lastHandler != null)
{
lastHandler.nextHandler = handler;
}
lastHandler = handler;
}
return res;
}
private static AbsWhackMoleNodeHandler CreateNodeHandler(WhackMoleNode node)
{
AbsWhackMoleNodeHandler handler = node.command switch
{
WhackMoleCommand.SingleModuleLightOn => new SingleModuleLightOnHandler(),
WhackMoleCommand.MultipleModuleLightOn => new MultipleModuleLightOnHandler(),
WhackMoleCommand.SingleModuleColorOn => new SingleModuleColorOnHandler(),
WhackMoleCommand.MultipleModuleColorOn => new MultipleModuleColorOnHandler(),
_ => throw new ArgumentOutOfRangeException()
};
handler.Init(node);
return handler;
}
}
public abstract class AbsWhackMoleNodeHandler
{
protected WhackMoleNode node;
public AbsWhackMoleNodeHandler nextHandler;
public readonly UnityEvent<bool> onHandleEnd = new();
public virtual void Init(WhackMoleNode nodeData)
{
node = nodeData;
}
public IEnumerator Handle()
{
yield return BeforePlug();
yield return WaitPlug();
yield return AfterPlug();
}
protected virtual IEnumerator BeforePlug()
{
// TODO 全部模块闪烁3S
yield return new WaitForSeconds(node.flickerTime);
}
protected abstract IEnumerator WaitPlug();
protected abstract IEnumerator AfterPlug();
public abstract void OnPlugIn(string moduleName);
}
public class SingleModuleLightOnHandler : AbsWhackMoleNodeHandler
{
private bool _isPlugIn;
public override void Init(WhackMoleNode nodeData)
{
base.Init(nodeData);
// 处理Random
if (nodeData.moduleName.ToLowerInvariant() == "random")
{
// TODO 随机选择一个模块
node.moduleName = "";
}
}
protected override IEnumerator WaitPlug()
{
// TODO 高亮某个模块
// FixSystemCenter.SystemDic.Get<BodyModuleSystem>().Highlight(node.moduleName);
// 进入循环等待插入事件,2s内未插入则进入失败结局
var waitTime = 0f;
while (!_isPlugIn && waitTime < node.lightOnTime)
{
waitTime += Time.deltaTime;
yield return null;
}
}
protected override IEnumerator AfterPlug()
{
if (_isPlugIn)
{
// TODO 正常插入,触发效果并进入下一个关卡
yield return null;
onHandleEnd?.Invoke(true);
}
else
{
// TODO 超时,触发失败结局
onHandleEnd?.Invoke(false);
}
}
public override void OnPlugIn(string moduleName)
{
if (moduleName == node.moduleName)
{
_isPlugIn = true;
}
}
}
public class MultipleModuleLightOnHandler : AbsWhackMoleNodeHandler
{
protected override IEnumerator WaitPlug()
{
// 等待插入
yield return new WaitUntil(() => false);
}
protected override IEnumerator AfterPlug()
{
throw new NotImplementedException();
}
public override void OnPlugIn(string moduleName)
{
}
}
public class SingleModuleColorOnHandler : AbsWhackMoleNodeHandler
{
protected override IEnumerator WaitPlug()
{
throw new NotImplementedException();
}
protected override IEnumerator AfterPlug()
{
throw new NotImplementedException();
}
public override void OnPlugIn(string moduleName)
{
}
}
public class MultipleModuleColorOnHandler : AbsWhackMoleNodeHandler
{
protected override IEnumerator WaitPlug()
{
throw new NotImplementedException();
}
protected override IEnumerator AfterPlug()
{
throw new NotImplementedException();
}
public override void OnPlugIn(string moduleName)
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d1b796d518a64802a34ce6ad301b3a00
timeCreated: 1752129433
@@ -0,0 +1,31 @@
using UnityEngine;
namespace AibisDream.FixSystem
{
public class WhackMoleSystem : MonoBehaviour
{
#region , BodyModuleSystem实现
public void StartAllFlicker()
{
}
public void StopAllFlicker()
{
}
public void LightOnModule()
{
}
public void LightOffModule()
{
}
#endregion
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 125c9a5846324fce848a39225f1b7ac6
timeCreated: 1751976011
File diff suppressed because one or more lines are too long