Compare commits
11 Commits
06b253da24
...
master
Author | SHA1 | Date | |
---|---|---|---|
9daa56a457 | |||
0a1aa83425 | |||
bb2c5aa436 | |||
ec905d2a27 | |||
2b4a7af1e1 | |||
5dd9760a20 | |||
3593a9f0e8 | |||
bb16550a0f | |||
6edc9fa3fd | |||
7c826ceba4 | |||
fc91a61930 |
8
Assets/Editor.meta
Normal file
8
Assets/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba8cd76dea417264a9aaa351a2836e28
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
47
Assets/Editor/StartFromCore.cs
Normal file
47
Assets/Editor/StartFromCore.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
// 文件路径:Assets/Editor/StartFromCore.cs
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.SceneManagement;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Editor
|
||||||
|
{
|
||||||
|
public static class StartFromCore
|
||||||
|
{
|
||||||
|
// 菜单路径:Tools/Start From Core 快捷键:Ctrl+Shift+C
|
||||||
|
[MenuItem("Tools/Start From Core %#c", false, 0)]
|
||||||
|
private static void StartFromCoreScene()
|
||||||
|
{
|
||||||
|
if (EditorApplication.isPlaying)
|
||||||
|
{
|
||||||
|
Debug.Log("已在 Play 模式,忽略重复操作。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string coreScenePath = "Assets/Scenes/Core.unity";
|
||||||
|
var coreScene = AssetDatabase.LoadAssetAtPath<SceneAsset>(coreScenePath);
|
||||||
|
|
||||||
|
if (coreScene == null)
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog(
|
||||||
|
"找不到 Core 场景",
|
||||||
|
$"请在 {coreScenePath} 放置名为 Core 的场景文件。",
|
||||||
|
"确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存当前场景(可选)
|
||||||
|
if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
|
||||||
|
{
|
||||||
|
// 把 Core 场景设置成“唯一”启动场景
|
||||||
|
EditorSceneManager.playModeStartScene = AssetDatabase.LoadAssetAtPath<SceneAsset>(coreScenePath);
|
||||||
|
|
||||||
|
// 进入 Play 模式
|
||||||
|
EditorApplication.EnterPlaymode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当正在播放时禁用菜单
|
||||||
|
[MenuItem("Tools/Start From Core", true)]
|
||||||
|
private static bool ValidateStartFromCoreScene() => !EditorApplication.isPlaying;
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Editor/StartFromCore.cs.meta
Normal file
11
Assets/Editor/StartFromCore.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 30bafb5dbef7d1a41ad35fd189ec9386
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
176
Assets/Prefab/Gameplay/BaseCube.prefab
Normal file
176
Assets/Prefab/Gameplay/BaseCube.prefab
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &7739979277884825363
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 71697885929342062}
|
||||||
|
- component: {fileID: 5281534013201777678}
|
||||||
|
- component: {fileID: 3694179230033504797}
|
||||||
|
- component: {fileID: 470645613676258024}
|
||||||
|
- component: {fileID: 8187785643586722023}
|
||||||
|
- component: {fileID: 7940149935342460565}
|
||||||
|
- component: {fileID: 5829756071943867929}
|
||||||
|
- component: {fileID: 3049630257319171134}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: BaseCube
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &71697885929342062
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 12.15, y: 1.32, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &5281534013201777678
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &3694179230033504797
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!54 &470645613676258024
|
||||||
|
Rigidbody:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Mass: 1
|
||||||
|
m_Drag: 0
|
||||||
|
m_AngularDrag: 0.05
|
||||||
|
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||||
|
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||||
|
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ImplicitCom: 1
|
||||||
|
m_ImplicitTensor: 1
|
||||||
|
m_UseGravity: 1
|
||||||
|
m_IsKinematic: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
--- !u!65 &8187785643586722023
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &7940149935342460565
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &5829756071943867929
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
--- !u!114 &3049630257319171134
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7739979277884825363}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 06015834a0da4561ba47d104b73171a4, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
7
Assets/Prefab/Gameplay/BaseCube.prefab.meta
Normal file
7
Assets/Prefab/Gameplay/BaseCube.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8f4de64a5cce27745b5566ff3ef971c8
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
150
Assets/Prefab/Gameplay/Button.prefab
Normal file
150
Assets/Prefab/Gameplay/Button.prefab
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2052340463965227198
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 502199709937918930}
|
||||||
|
- component: {fileID: 8222817459474332972}
|
||||||
|
- component: {fileID: 8915067524543900667}
|
||||||
|
- component: {fileID: 2933073816800901446}
|
||||||
|
- component: {fileID: 2654927572387158689}
|
||||||
|
- component: {fileID: 162156210837205425}
|
||||||
|
- component: {fileID: 4434834246038522293}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Button
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &502199709937918930
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 4.13, z: -4.94}
|
||||||
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.15}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &8222817459474332972
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &8915067524543900667
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &2933073816800901446
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &2654927572387158689
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &162156210837205425
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
--- !u!114 &4434834246038522293
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2052340463965227198}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7f5359facd804a0cb94d416c9c54a167, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Interactable: 1
|
||||||
|
signalDuration: 1
|
||||||
|
isActive: 1
|
7
Assets/Prefab/Gameplay/Button.prefab.meta
Normal file
7
Assets/Prefab/Gameplay/Button.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ddd89e93db279184daa80d86bd4e770f
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@@ -32,7 +32,7 @@ Transform:
|
|||||||
serializedVersion: 2
|
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.71, z: 0}
|
m_LocalPosition: {x: 0, y: 0.71, z: 0}
|
||||||
m_LocalScale: {x: 1.9314, y: 2.3882, z: 1}
|
m_LocalScale: {x: 2, y: 3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
@@ -132,8 +132,8 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 3bdc5380046d4cacb0dd579877f320eb, type: 3}
|
m_Script: {fileID: 11500000, guid: 3bdc5380046d4cacb0dd579877f320eb, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
isActive: 1
|
|
||||||
Interactable: 1
|
Interactable: 1
|
||||||
|
isActive: 1
|
||||||
--- !u!114 &6634784627554641663
|
--- !u!114 &6634784627554641663
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
149
Assets/Prefab/Gameplay/Lever.prefab
Normal file
149
Assets/Prefab/Gameplay/Lever.prefab
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &6227019518059310355
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2356242250385391551}
|
||||||
|
- component: {fileID: 4763900636075465414}
|
||||||
|
- component: {fileID: 6839980979269427984}
|
||||||
|
- component: {fileID: 6900514999789347776}
|
||||||
|
- component: {fileID: 5480938290288266788}
|
||||||
|
- component: {fileID: 3969518804808817043}
|
||||||
|
- component: {fileID: 4936355834716623489}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Lever
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2356242250385391551
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 10, y: 1, z: -5}
|
||||||
|
m_LocalScale: {x: 0.3, y: 0.8, z: 0.15}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &4763900636075465414
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6839980979269427984
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &6900514999789347776
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &5480938290288266788
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &3969518804808817043
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
--- !u!114 &4936355834716623489
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6227019518059310355}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 6b9b9a895b0d40edb9a6d7213afbb256, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Interactable: 1
|
||||||
|
isActive: 1
|
7
Assets/Prefab/Gameplay/Lever.prefab.meta
Normal file
7
Assets/Prefab/Gameplay/Lever.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: be07db3098b709a40a6965f50f8c9640
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
149
Assets/Prefab/Gameplay/NumberSlot.prefab
Normal file
149
Assets/Prefab/Gameplay/NumberSlot.prefab
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1079693037897703353
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3692176305921728328}
|
||||||
|
- component: {fileID: 1875558020952416763}
|
||||||
|
- component: {fileID: 6958443043046651409}
|
||||||
|
- component: {fileID: 3036000835194628394}
|
||||||
|
- component: {fileID: 9057593411103083886}
|
||||||
|
- component: {fileID: 7384438008133576482}
|
||||||
|
- component: {fileID: 2187320556207737093}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: NumberSlot
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3692176305921728328
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 10, y: 0.8, z: -5}
|
||||||
|
m_LocalScale: {x: 1.5, y: 1.5, z: 0.15}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &1875558020952416763
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &6958443043046651409
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &3036000835194628394
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &9057593411103083886
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &7384438008133576482
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
--- !u!114 &2187320556207737093
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1079693037897703353}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 301178d89b6b43e0844e3d39aa579442, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
currentNumber: 0
|
||||||
|
correctNumber: 1
|
7
Assets/Prefab/Gameplay/NumberSlot.prefab.meta
Normal file
7
Assets/Prefab/Gameplay/NumberSlot.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 17ad2833fef1bc044bcc25a227730d74
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@@ -328,9 +328,9 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 5981311fef324f939be05186f7936173, type: 3}
|
m_Script: {fileID: 11500000, guid: 5981311fef324f939be05186f7936173, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
IsEnableConnecting: 1
|
||||||
raycaster: {fileID: 8217262775185484522}
|
raycaster: {fileID: 8217262775185484522}
|
||||||
linePrefab: {fileID: 2140853775088731430, guid: 5ded9ec889d81364ba1dd360c848f147,
|
maxConnectDistance: 10.5
|
||||||
type: 3}
|
|
||||||
--- !u!1 &3610935294554348573
|
--- !u!1 &3610935294554348573
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
153
Assets/Prefab/Gameplay/PressurePlate.prefab
Normal file
153
Assets/Prefab/Gameplay/PressurePlate.prefab
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2191333364839819432
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8123550679489282954}
|
||||||
|
- component: {fileID: 2493044360019674672}
|
||||||
|
- component: {fileID: 1538197780757662793}
|
||||||
|
- component: {fileID: 8785614081330407045}
|
||||||
|
- component: {fileID: 220912239936987690}
|
||||||
|
- component: {fileID: -7803032184951374842}
|
||||||
|
- component: {fileID: 4542395966412092557}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: PressurePlate
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8123550679489282954
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 3.72, y: 1, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 0.2, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &2493044360019674672
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &1538197780757662793
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &8785614081330407045
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &220912239936987690
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
--- !u!114 &-7803032184951374842
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2557c7d42f7a4d8896712ab2ae980b6f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isActive: 1
|
||||||
|
detectLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
plateSize: {x: 1.2, y: 0.4, z: 1.2}
|
||||||
|
plateOffset: {x: 0, y: 0.5, z: 0}
|
||||||
|
--- !u!114 &4542395966412092557
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2191333364839819432}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
7
Assets/Prefab/Gameplay/PressurePlate.prefab.meta
Normal file
7
Assets/Prefab/Gameplay/PressurePlate.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b259f2c2ad8200d49b8ba9163724d69a
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@@ -159,7 +159,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 20.1479, y: 17.2697}
|
m_AnchoredPosition: {x: 20.1479, y: 100}
|
||||||
m_SizeDelta: {x: 386.4251, y: 173.9142}
|
m_SizeDelta: {x: 386.4251, y: 173.9142}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &65129760
|
--- !u!114 &65129760
|
||||||
@@ -269,6 +269,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
IsOpenOnFirstLoad: 1
|
IsOpenOnFirstLoad: 1
|
||||||
|
levelName: Level1
|
||||||
--- !u!1 &464114337
|
--- !u!1 &464114337
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -696,6 +697,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 65129759}
|
- {fileID: 65129759}
|
||||||
|
- {fileID: 1558051558}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
@@ -716,6 +718,85 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layer: 1
|
layer: 1
|
||||||
|
--- !u!1 &1303181320
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1303181321}
|
||||||
|
- component: {fileID: 1303181323}
|
||||||
|
- component: {fileID: 1303181322}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text (Legacy)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1303181321
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1303181320}
|
||||||
|
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: 1558051558}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1303181322
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1303181320}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 56
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 76
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: Start Test
|
||||||
|
--- !u!222 &1303181323
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1303181320}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &1444341145
|
--- !u!1 &1444341145
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -831,6 +912,154 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layer: 2
|
layer: 2
|
||||||
|
--- !u!1 &1558051557
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1558051558}
|
||||||
|
- component: {fileID: 1558051562}
|
||||||
|
- component: {fileID: 1558051561}
|
||||||
|
- component: {fileID: 1558051560}
|
||||||
|
- component: {fileID: 1558051559}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Button (Legacy) (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1558051558
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1558051557}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1303181321}
|
||||||
|
m_Father: {fileID: 1182808914}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 20.1479, y: -113}
|
||||||
|
m_SizeDelta: {x: 386.4251, y: 173.9142}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1558051559
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1558051557}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ca5b9d4538234778ab1f51d220e79e8b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
IsOpenOnFirstLoad: 1
|
||||||
|
levelName: Test
|
||||||
|
--- !u!114 &1558051560
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1558051557}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_WrapAround: 0
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 1
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 1558051561}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1558051559}
|
||||||
|
m_TargetAssemblyTypeName: UI.StartGameButton, UI
|
||||||
|
m_MethodName: StartGame
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
|
--- !u!114 &1558051561
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1558051557}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!222 &1558051562
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1558051557}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &2116337628
|
--- !u!1 &2116337628
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
1738
Assets/Scenes/Test.unity
Normal file
1738
Assets/Scenes/Test.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/Test.unity.meta
Normal file
7
Assets/Scenes/Test.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba1c179ea1c89634a8d86462a3f693e2
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@@ -6,61 +6,73 @@ namespace Script.Gameplay.Connect
|
|||||||
// 只负责在场景中绘制连接线,并处理信号传递
|
// 只负责在场景中绘制连接线,并处理信号传递
|
||||||
public class ConnectionLine : MonoBehaviour
|
public class ConnectionLine : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private MonoBehaviour monoSource;
|
[SerializeField] private MonoBehaviour monoPointA;
|
||||||
[SerializeField] private MonoBehaviour monoTarget;
|
[SerializeField] private MonoBehaviour monoPointB;
|
||||||
private IConnectable _output;
|
private IConnectable _pointA;
|
||||||
private IConnectable _input;
|
private IConnectable _pointB;
|
||||||
|
|
||||||
private LineRenderer line;
|
private LineRenderer line;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_output = monoSource as IConnectable;
|
_pointA = monoPointA as IConnectable;
|
||||||
_input = monoTarget as IConnectable;
|
_pointB = monoPointB as IConnectable;
|
||||||
|
|
||||||
line = GetComponent<LineRenderer>();
|
line = GetComponent<LineRenderer>();
|
||||||
|
|
||||||
if (_output != null && _input != null)
|
SetLineRendererPositions();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetConnectable(IConnectable pointA, IConnectable pointB)
|
||||||
|
{
|
||||||
|
if(pointA == null || pointB == null)
|
||||||
{
|
{
|
||||||
SetConnectable(_output, _input);
|
Debug.Log("ConnectionLine requires two valid IConnectable points.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pointA == pointB)
|
||||||
|
{
|
||||||
|
Debug.Log("ConnectionLine cannot connect the same point.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_pointA = pointA;
|
||||||
|
_pointB = pointB;
|
||||||
|
pointA.ConnectionLines.Add(this);
|
||||||
|
pointB.ConnectionLines.Add(this);
|
||||||
|
SetLineRendererPositions();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetLineRendererPositions()
|
||||||
|
{
|
||||||
|
if (_pointA != null && _pointB != null)
|
||||||
|
{
|
||||||
|
line.SetPositions(new Vector3[]
|
||||||
|
{
|
||||||
|
_pointA.GetPosition(),
|
||||||
|
_pointB.GetPosition()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetConnectable(IConnectable output, IConnectable input)
|
public void SignalActive(bool active, GameObject sender)
|
||||||
{
|
{
|
||||||
_output = output;
|
if (_pointA != null && _pointB != null)
|
||||||
_input = input;
|
|
||||||
_output.IsConnectedOutput = true;
|
|
||||||
_input.IsConnectedInput = true;
|
|
||||||
|
|
||||||
line.SetPositions(new Vector3[]
|
|
||||||
{
|
{
|
||||||
_output.GetPosition(),
|
if (sender == _pointA.GetGameObject())
|
||||||
_input.GetPosition()
|
{
|
||||||
});
|
_pointB.SignalActive(active, sender);
|
||||||
}
|
}
|
||||||
|
else if (sender == _pointB.GetGameObject())
|
||||||
public void ReceiveSignal(bool active)
|
{
|
||||||
{
|
_pointA.SignalActive(active, sender);
|
||||||
SendSignal(active);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendSignal(bool active)
|
|
||||||
{
|
|
||||||
_input.ReceiveSignal(active,this.gameObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
if (_output != null)
|
_pointA.ConnectionLines.Remove(this);
|
||||||
{
|
_pointB.ConnectionLines.Remove(this);
|
||||||
_output.IsConnectedOutput = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_input != null)
|
|
||||||
{
|
|
||||||
_input.IsConnectedInput = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,25 +1,73 @@
|
|||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Core;
|
using Core;
|
||||||
|
|
||||||
namespace Script.Gameplay.Connect
|
namespace Script.Gameplay.Connect
|
||||||
{
|
{
|
||||||
|
[Serializable]
|
||||||
|
public class PreviousConnection
|
||||||
|
{
|
||||||
|
public int PreConnectionID;
|
||||||
|
public MonoBehaviour source;
|
||||||
|
public MonoBehaviour target;
|
||||||
|
}
|
||||||
public class ConnectionLineManager : MonoSingleton<ConnectionLineManager>
|
public class ConnectionLineManager : MonoSingleton<ConnectionLineManager>
|
||||||
{
|
{
|
||||||
[SerializeField] private GameObject linePrefab;
|
[SerializeField] private GameObject linePrefab;
|
||||||
public List<ConnectionLine> connectionLines = new List<ConnectionLine>();
|
[SerializeField]private List<PreviousConnection> preConnectionLines = new List<PreviousConnection>();
|
||||||
|
private List<ConnectionLine> connectionLines = new List<ConnectionLine>();
|
||||||
public ConnectionLine GenerateConnectionLine(IConnectable source, IConnectable target)
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
GeneratePreviousConnectionLines(preConnectionLines);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConnectionLine GenerateConnectionLine(IConnectable a, IConnectable b)
|
||||||
{
|
{
|
||||||
GameObject lineObject = Instantiate(linePrefab, this.transform);
|
GameObject lineObject = Instantiate(linePrefab, this.transform);
|
||||||
ConnectionLine connectionLine = lineObject.GetComponent<ConnectionLine>();
|
ConnectionLine connectionLine = lineObject.GetComponent<ConnectionLine>();
|
||||||
if (connectionLine != null)
|
if (connectionLine != null)
|
||||||
{
|
{
|
||||||
connectionLine.SetConnectable(source, target);
|
connectionLine.SetConnectable(a, b);
|
||||||
connectionLines.Add(connectionLine);
|
connectionLines.Add(connectionLine);
|
||||||
return connectionLine;
|
return connectionLine;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CutTargetConnectionLines(IConnectable target)
|
||||||
|
{
|
||||||
|
List<ConnectionLine> linesToRemove = new List<ConnectionLine>();
|
||||||
|
foreach (var line in connectionLines)
|
||||||
|
{
|
||||||
|
if (line != null && (line.Equals(target)))
|
||||||
|
{
|
||||||
|
linesToRemove.Add(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (var line in linesToRemove)
|
||||||
|
{
|
||||||
|
connectionLines.Remove(line);
|
||||||
|
Destroy(line.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GeneratePreviousConnectionLines(List<PreviousConnection> previousConnections)
|
||||||
|
{
|
||||||
|
foreach (var preConnection in previousConnections)
|
||||||
|
{
|
||||||
|
IConnectable source = preConnection.source as IConnectable;
|
||||||
|
IConnectable target = preConnection.target as IConnectable;
|
||||||
|
if (source != null && target != null)
|
||||||
|
{
|
||||||
|
GenerateConnectionLine(source, target);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log(preConnection.PreConnectionID + " connection failed to load.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -8,12 +8,9 @@ namespace Script.Gameplay.Connect
|
|||||||
void OnGazeEnter(); // 玩家开始注视时触发
|
void OnGazeEnter(); // 玩家开始注视时触发
|
||||||
void OnGazeExit(); // 玩家停止注视时触发
|
void OnGazeExit(); // 玩家停止注视时触发
|
||||||
Vector3 GetPosition(); // 获取连接点位置
|
Vector3 GetPosition(); // 获取连接点位置
|
||||||
|
GameObject GetGameObject(); // 获取连接点物体
|
||||||
string GetConnectableName(); // 获取连接点名称
|
string GetConnectableName(); // 获取连接点名称
|
||||||
public ConnectionLine OutputConnectionLine { get; set; }
|
public List<ConnectionLine> ConnectionLines { get; set; }
|
||||||
public ConnectionLine InputConnectionLine { get; set; }
|
void SignalActive(bool active, GameObject sender); // 被激活
|
||||||
bool IsConnectedOutput { get; set; } // 是否作为输出端连接
|
|
||||||
bool IsConnectedInput { get; set; } // 是否作为输入端连接
|
|
||||||
void ReceiveSignal(bool active, GameObject sender); // 接收信号
|
|
||||||
void SendSignal(bool active, GameObject sender); // 发出信号
|
|
||||||
}
|
}
|
||||||
}
|
}
|
8
Assets/Script/Gameplay/Connect/ISignalSender.cs
Normal file
8
Assets/Script/Gameplay/Connect/ISignalSender.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
namespace Script.Gameplay.Connect
|
||||||
|
{
|
||||||
|
public interface ISignalSender
|
||||||
|
{
|
||||||
|
public void SendSignal(bool active);
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Script/Gameplay/Connect/ISignalSender.cs.meta
Normal file
3
Assets/Script/Gameplay/Connect/ISignalSender.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dc3af72006f342c3b8b7526a5b09e6ee
|
||||||
|
timeCreated: 1760958923
|
116
Assets/Script/Gameplay/Facility/ButtonInteractController.cs
Normal file
116
Assets/Script/Gameplay/Facility/ButtonInteractController.cs
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Script.Gameplay.Interface;
|
||||||
|
using Script.Gameplay.Connect;
|
||||||
|
|
||||||
|
namespace Script.Gameplay.Facility
|
||||||
|
{
|
||||||
|
public class ButtonInteractController : MonoBehaviour, IInteractable, IEditableComponent, IConnectable, ISignalSender
|
||||||
|
{
|
||||||
|
#region Interactable
|
||||||
|
|
||||||
|
public bool Interactable = true;
|
||||||
|
[SerializeField] private float signalDuration = 1.0f; // 信号持续时间(秒)
|
||||||
|
|
||||||
|
public string GetInteractPrompt()
|
||||||
|
{
|
||||||
|
return "按F按下按钮";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Interact(GameObject interactor)
|
||||||
|
{
|
||||||
|
if (!Interactable) return;
|
||||||
|
StartCoroutine(SendSignalCoroutine());
|
||||||
|
Debug.Log("Button pressed");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeEnter(GameObject editor)
|
||||||
|
{
|
||||||
|
// 可选:高亮按钮等
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeExit(GameObject editor)
|
||||||
|
{
|
||||||
|
// 可选:取消高亮
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator SendSignalCoroutine()
|
||||||
|
{
|
||||||
|
SendSignal(true);
|
||||||
|
Interactable = false;
|
||||||
|
// 按钮压下的动画或效果可以在这里添加
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(signalDuration);
|
||||||
|
SendSignal(false);
|
||||||
|
Interactable = true;
|
||||||
|
// 按钮弹起的动画或效果可以在这里添加
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region EditableComponent
|
||||||
|
|
||||||
|
[SerializeField] private bool isActive = true;
|
||||||
|
|
||||||
|
public bool IsActive
|
||||||
|
{
|
||||||
|
get => isActive;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isActive = value;
|
||||||
|
Interactable = isActive;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ComponentName { get; set; } = "Button";
|
||||||
|
public LockLevel LockLevel => LockLevel.Red;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Connectable
|
||||||
|
|
||||||
|
public void OnGazeEnter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetPosition()
|
||||||
|
{
|
||||||
|
return transform.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GameObject GetGameObject()
|
||||||
|
{
|
||||||
|
return gameObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetConnectableName()
|
||||||
|
{
|
||||||
|
return gameObject.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||||
|
public void SignalActive(bool active, GameObject sender)
|
||||||
|
{
|
||||||
|
// 按钮通常不接收信号,因此这里可以留空
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendSignal(bool active)
|
||||||
|
{
|
||||||
|
if (ConnectionLines != null)
|
||||||
|
{
|
||||||
|
foreach (var line in ConnectionLines)
|
||||||
|
{
|
||||||
|
line.SignalActive(active, this.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7f5359facd804a0cb94d416c9c54a167
|
||||||
|
timeCreated: 1760923022
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Script.Gameplay.Interface;
|
using Script.Gameplay.Interface;
|
||||||
using Script.Gameplay.Connect;
|
using Script.Gameplay.Connect;
|
||||||
@@ -95,27 +95,22 @@ namespace Script.Gameplay.Facility
|
|||||||
return transform.position;
|
return transform.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GameObject GetGameObject()
|
||||||
|
{
|
||||||
|
return gameObject;
|
||||||
|
}
|
||||||
|
|
||||||
public string GetConnectableName()
|
public string GetConnectableName()
|
||||||
{
|
{
|
||||||
return gameObject.name;
|
return gameObject.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConnectionLine OutputConnectionLine { get; set; }
|
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||||
public ConnectionLine InputConnectionLine { get; set; }
|
public void SignalActive(bool active, GameObject sender)
|
||||||
|
|
||||||
public bool IsConnectedOutput { get; set; }
|
|
||||||
public bool IsConnectedInput { get; set; }
|
|
||||||
|
|
||||||
public void ReceiveSignal(bool active, GameObject sender)
|
|
||||||
{
|
{
|
||||||
Interact(sender);
|
Interact(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendSignal(bool active, GameObject sender)
|
|
||||||
{
|
|
||||||
OutputConnectionLine.ReceiveSignal(active);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Script.Gameplay.Interface;
|
using Script.Gameplay.Interface;
|
||||||
|
|
||||||
|
97
Assets/Script/Gameplay/Facility/LeverInteractController.cs
Normal file
97
Assets/Script/Gameplay/Facility/LeverInteractController.cs
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Script.Gameplay.Interface;
|
||||||
|
using Script.Gameplay.Connect;
|
||||||
|
|
||||||
|
namespace Script.Gameplay.Facility
|
||||||
|
{
|
||||||
|
public class LeverInteractController : MonoBehaviour, IInteractable, IEditableComponent, IConnectable, ISignalSender
|
||||||
|
{
|
||||||
|
#region Interactable
|
||||||
|
|
||||||
|
public bool Interactable = true;
|
||||||
|
private bool isPulled = false;
|
||||||
|
|
||||||
|
public string GetInteractPrompt()
|
||||||
|
{
|
||||||
|
return "按F拉动拉杆";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Interact(GameObject interactor)
|
||||||
|
{
|
||||||
|
if (!Interactable) return;
|
||||||
|
isPulled = !isPulled;
|
||||||
|
SendSignal(isPulled);
|
||||||
|
// 可选:拉杆动画
|
||||||
|
Debug.Log(isPulled ? "Lever pulled down" : "Lever reset");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeEnter(GameObject editor)
|
||||||
|
{
|
||||||
|
// 可选:高亮拉杆
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeExit(GameObject editor)
|
||||||
|
{
|
||||||
|
// 可选:取消高亮
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region EditableComponent
|
||||||
|
|
||||||
|
[SerializeField] private bool isActive = true;
|
||||||
|
|
||||||
|
public bool IsActive
|
||||||
|
{
|
||||||
|
get => isActive;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isActive = value;
|
||||||
|
Interactable = isActive;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ComponentName { get; set; } = "Lever";
|
||||||
|
public LockLevel LockLevel => LockLevel.Red;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Connectable
|
||||||
|
|
||||||
|
public void OnGazeEnter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetPosition() => transform.position;
|
||||||
|
public GameObject GetGameObject()
|
||||||
|
{
|
||||||
|
return gameObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetConnectableName() => gameObject.name;
|
||||||
|
public List<ConnectionLine> ConnectionLines { get; set; }= new List<ConnectionLine>();
|
||||||
|
|
||||||
|
public void SignalActive(bool active, GameObject sender)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendSignal(bool active)
|
||||||
|
{
|
||||||
|
if (ConnectionLines != null)
|
||||||
|
{
|
||||||
|
foreach (var line in ConnectionLines)
|
||||||
|
{
|
||||||
|
line.SignalActive(active, this.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6b9b9a895b0d40edb9a6d7213afbb256
|
||||||
|
timeCreated: 1760925436
|
76
Assets/Script/Gameplay/Facility/NumberSlotController.cs
Normal file
76
Assets/Script/Gameplay/Facility/NumberSlotController.cs
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Script.Gameplay.Connect;
|
||||||
|
|
||||||
|
namespace Script.Gameplay.Facility
|
||||||
|
{
|
||||||
|
// 号码枚举类型
|
||||||
|
public enum NumberType
|
||||||
|
{
|
||||||
|
Zero,
|
||||||
|
One,
|
||||||
|
Two,
|
||||||
|
Three,
|
||||||
|
Four,
|
||||||
|
Five,
|
||||||
|
// Six,
|
||||||
|
// Seven,
|
||||||
|
// Eight,
|
||||||
|
// Nine
|
||||||
|
}
|
||||||
|
|
||||||
|
// 号码槽
|
||||||
|
public class NumberSlotController : MonoBehaviour, IConnectable, ISignalSender
|
||||||
|
{
|
||||||
|
[Header("号码槽设置")]
|
||||||
|
[SerializeField] private NumberType currentNumber = NumberType.Zero;
|
||||||
|
[SerializeField] private NumberType correctNumber = NumberType.One;
|
||||||
|
|
||||||
|
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||||
|
|
||||||
|
// 不可编辑,不可交互
|
||||||
|
// 可连接,可发信号
|
||||||
|
|
||||||
|
public void OnGazeEnter() { }
|
||||||
|
public void OnGazeExit() { }
|
||||||
|
public Vector3 GetPosition() => transform.position;
|
||||||
|
public GameObject GetGameObject() => gameObject;
|
||||||
|
public string GetConnectableName() => gameObject.name;
|
||||||
|
|
||||||
|
// 接收信号
|
||||||
|
public void SignalActive(bool active, GameObject sender)
|
||||||
|
{
|
||||||
|
if (active)
|
||||||
|
{
|
||||||
|
SwitchToNextNumber();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换到下一个号码
|
||||||
|
private void SwitchToNextNumber()
|
||||||
|
{
|
||||||
|
currentNumber = (NumberType)(((int)currentNumber + 1) % System.Enum.GetValues(typeof(NumberType)).Length);
|
||||||
|
CheckNumberAndSendSignal();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查号码并发信号
|
||||||
|
private void CheckNumberAndSendSignal()
|
||||||
|
{
|
||||||
|
bool isCorrect = currentNumber == correctNumber;
|
||||||
|
SendSignal(isCorrect);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发出信号
|
||||||
|
public void SendSignal(bool active)
|
||||||
|
{
|
||||||
|
if (ConnectionLines != null)
|
||||||
|
{
|
||||||
|
foreach (var line in ConnectionLines)
|
||||||
|
{
|
||||||
|
line.SignalActive(active, this.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 301178d89b6b43e0844e3d39aa579442
|
||||||
|
timeCreated: 1760961220
|
88
Assets/Script/Gameplay/Facility/PressurePlateController.cs
Normal file
88
Assets/Script/Gameplay/Facility/PressurePlateController.cs
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Script.Gameplay.Interface;
|
||||||
|
using Script.Gameplay.Connect;
|
||||||
|
|
||||||
|
namespace Script.Gameplay.Facility
|
||||||
|
{
|
||||||
|
public class PressurePlateController : MonoBehaviour, IEditableComponent, IConnectable, ISignalSender
|
||||||
|
{
|
||||||
|
[SerializeField] private bool isActive = true;
|
||||||
|
[SerializeField] private LayerMask detectLayer = ~0; // 检测所有层,可在Inspector中指定
|
||||||
|
[SerializeField] private Vector3 plateSize = new Vector3(1, 0.2f, 1);
|
||||||
|
[SerializeField] private Vector3 plateOffset = Vector3.up * 0.1f;
|
||||||
|
|
||||||
|
private bool lastState = false;
|
||||||
|
|
||||||
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
if (!isActive) return;
|
||||||
|
bool hasObject = Physics.CheckBox(transform.position + plateOffset, plateSize * 0.5f, Quaternion.identity,
|
||||||
|
detectLayer);
|
||||||
|
if (hasObject != lastState)
|
||||||
|
{
|
||||||
|
SendSignal(hasObject);
|
||||||
|
lastState = hasObject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region EditableComponent
|
||||||
|
|
||||||
|
public bool IsActive
|
||||||
|
{
|
||||||
|
get => isActive;
|
||||||
|
set => isActive = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ComponentName { get; set; } = "PressurePlate";
|
||||||
|
public LockLevel LockLevel => LockLevel.Red;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Connectable
|
||||||
|
|
||||||
|
public void OnGazeEnter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnGazeExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetPosition() => transform.position;
|
||||||
|
|
||||||
|
public GameObject GetGameObject()
|
||||||
|
{
|
||||||
|
return gameObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetConnectableName() => gameObject.name;
|
||||||
|
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||||
|
|
||||||
|
public void SignalActive(bool active, GameObject sender)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendSignal(bool active)
|
||||||
|
{
|
||||||
|
if (ConnectionLines != null)
|
||||||
|
{
|
||||||
|
foreach (var line in ConnectionLines)
|
||||||
|
{
|
||||||
|
line.SignalActive(active, this.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
private void OnDrawGizmosSelected()
|
||||||
|
{
|
||||||
|
Gizmos.color = Color.yellow;
|
||||||
|
Gizmos.DrawWireCube(transform.position + plateOffset, plateSize);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2557c7d42f7a4d8896712ab2ae980b6f
|
||||||
|
timeCreated: 1760924285
|
@@ -15,7 +15,7 @@ namespace Script.Gameplay.Facility
|
|||||||
{
|
{
|
||||||
isActive = value;
|
isActive = value;
|
||||||
//具体被编辑的逻辑
|
//具体被编辑的逻辑
|
||||||
_rigidbody.isKinematic = isActive;
|
_rigidbody.isKinematic = !isActive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ namespace Script.Gameplay.Facility
|
|||||||
{
|
{
|
||||||
_rigidbody = GetComponent<Rigidbody>();
|
_rigidbody = GetComponent<Rigidbody>();
|
||||||
//应用序列化的初始状态
|
//应用序列化的初始状态
|
||||||
_rigidbody.isKinematic = isActive;
|
_rigidbody.isKinematic = !isActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
@@ -36,7 +36,7 @@ namespace Script.Gameplay.Facility
|
|||||||
//在编辑器中即时生效
|
//在编辑器中即时生效
|
||||||
_rigidbody = _rigidbody == null ? GetComponent<Rigidbody>() : _rigidbody;
|
_rigidbody = _rigidbody == null ? GetComponent<Rigidbody>() : _rigidbody;
|
||||||
if (_rigidbody != null)
|
if (_rigidbody != null)
|
||||||
_rigidbody.isKinematic = isActive;
|
_rigidbody.isKinematic = !isActive;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -7,26 +7,31 @@ namespace Script.Gameplay.Global
|
|||||||
{
|
{
|
||||||
public enum GameState
|
public enum GameState
|
||||||
{
|
{
|
||||||
Boot, // 初始化
|
Boot, // 初始化
|
||||||
MainMenu, // 主菜单
|
MainMenu, // 主菜单
|
||||||
Playing, // 游戏中
|
Playing, // 游戏中
|
||||||
Paused, // 暂停
|
Paused, // 暂停
|
||||||
GameOver, // 游戏结束
|
GameOver, // 游戏结束
|
||||||
Victory // 胜利
|
Victory // 胜利
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GameFlowManager : MonoSingleton<GameFlowManager>
|
public class GameFlowManager : MonoSingleton<GameFlowManager>
|
||||||
{
|
{
|
||||||
|
public bool IsOpenRestartGameOnCountdownFinish = true;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
GameCountdownManager.Instance.StartLevelTimer();
|
GameCountdownManager.Instance.StartLevelTimer();
|
||||||
GameCountdownManager.Instance.OnFinish.AddListener(RestartGame);
|
GameCountdownManager.Instance.OnFinish.AddListener(() =>
|
||||||
|
{
|
||||||
|
if (IsOpenRestartGameOnCountdownFinish) RestartGame();
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestartGame()
|
public void RestartGame()
|
||||||
{
|
{
|
||||||
GameManager.Instance.ReStartGame();
|
GameManager.Instance.ReStartGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -118,6 +118,15 @@ namespace Script.Gameplay.Input
|
|||||||
""processors"": """",
|
""processors"": """",
|
||||||
""interactions"": """",
|
""interactions"": """",
|
||||||
""initialStateCheck"": false
|
""initialStateCheck"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""CutLine"",
|
||||||
|
""type"": ""Button"",
|
||||||
|
""id"": ""bf20e378-b5e0-4749-90b7-fc2aa09bd5c9"",
|
||||||
|
""expectedControlType"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """",
|
||||||
|
""initialStateCheck"": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
""bindings"": [
|
""bindings"": [
|
||||||
@@ -274,6 +283,17 @@ namespace Script.Gameplay.Input
|
|||||||
""action"": ""SetInput"",
|
""action"": ""SetInput"",
|
||||||
""isComposite"": false,
|
""isComposite"": false,
|
||||||
""isPartOfComposite"": false
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""53d79cef-a048-4b85-8078-03fcfeb79182"",
|
||||||
|
""path"": ""<Keyboard>/x"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": """",
|
||||||
|
""action"": ""CutLine"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -292,6 +312,7 @@ namespace Script.Gameplay.Input
|
|||||||
m_Player_Connect = m_Player.FindAction("Connect", throwIfNotFound: true);
|
m_Player_Connect = m_Player.FindAction("Connect", throwIfNotFound: true);
|
||||||
m_Player_SetOutput = m_Player.FindAction("SetOutput", throwIfNotFound: true);
|
m_Player_SetOutput = m_Player.FindAction("SetOutput", throwIfNotFound: true);
|
||||||
m_Player_SetInput = m_Player.FindAction("SetInput", throwIfNotFound: true);
|
m_Player_SetInput = m_Player.FindAction("SetInput", throwIfNotFound: true);
|
||||||
|
m_Player_CutLine = m_Player.FindAction("CutLine", throwIfNotFound: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
~@PlayerInputActions()
|
~@PlayerInputActions()
|
||||||
@@ -368,6 +389,7 @@ namespace Script.Gameplay.Input
|
|||||||
private readonly InputAction m_Player_Connect;
|
private readonly InputAction m_Player_Connect;
|
||||||
private readonly InputAction m_Player_SetOutput;
|
private readonly InputAction m_Player_SetOutput;
|
||||||
private readonly InputAction m_Player_SetInput;
|
private readonly InputAction m_Player_SetInput;
|
||||||
|
private readonly InputAction m_Player_CutLine;
|
||||||
public struct PlayerActions
|
public struct PlayerActions
|
||||||
{
|
{
|
||||||
private @PlayerInputActions m_Wrapper;
|
private @PlayerInputActions m_Wrapper;
|
||||||
@@ -382,6 +404,7 @@ namespace Script.Gameplay.Input
|
|||||||
public InputAction @Connect => m_Wrapper.m_Player_Connect;
|
public InputAction @Connect => m_Wrapper.m_Player_Connect;
|
||||||
public InputAction @SetOutput => m_Wrapper.m_Player_SetOutput;
|
public InputAction @SetOutput => m_Wrapper.m_Player_SetOutput;
|
||||||
public InputAction @SetInput => m_Wrapper.m_Player_SetInput;
|
public InputAction @SetInput => m_Wrapper.m_Player_SetInput;
|
||||||
|
public InputAction @CutLine => m_Wrapper.m_Player_CutLine;
|
||||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||||
public void Enable() { Get().Enable(); }
|
public void Enable() { Get().Enable(); }
|
||||||
public void Disable() { Get().Disable(); }
|
public void Disable() { Get().Disable(); }
|
||||||
@@ -421,6 +444,9 @@ namespace Script.Gameplay.Input
|
|||||||
@SetInput.started += instance.OnSetInput;
|
@SetInput.started += instance.OnSetInput;
|
||||||
@SetInput.performed += instance.OnSetInput;
|
@SetInput.performed += instance.OnSetInput;
|
||||||
@SetInput.canceled += instance.OnSetInput;
|
@SetInput.canceled += instance.OnSetInput;
|
||||||
|
@CutLine.started += instance.OnCutLine;
|
||||||
|
@CutLine.performed += instance.OnCutLine;
|
||||||
|
@CutLine.canceled += instance.OnCutLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnregisterCallbacks(IPlayerActions instance)
|
private void UnregisterCallbacks(IPlayerActions instance)
|
||||||
@@ -455,6 +481,9 @@ namespace Script.Gameplay.Input
|
|||||||
@SetInput.started -= instance.OnSetInput;
|
@SetInput.started -= instance.OnSetInput;
|
||||||
@SetInput.performed -= instance.OnSetInput;
|
@SetInput.performed -= instance.OnSetInput;
|
||||||
@SetInput.canceled -= instance.OnSetInput;
|
@SetInput.canceled -= instance.OnSetInput;
|
||||||
|
@CutLine.started -= instance.OnCutLine;
|
||||||
|
@CutLine.performed -= instance.OnCutLine;
|
||||||
|
@CutLine.canceled -= instance.OnCutLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveCallbacks(IPlayerActions instance)
|
public void RemoveCallbacks(IPlayerActions instance)
|
||||||
@@ -484,6 +513,7 @@ namespace Script.Gameplay.Input
|
|||||||
void OnConnect(InputAction.CallbackContext context);
|
void OnConnect(InputAction.CallbackContext context);
|
||||||
void OnSetOutput(InputAction.CallbackContext context);
|
void OnSetOutput(InputAction.CallbackContext context);
|
||||||
void OnSetInput(InputAction.CallbackContext context);
|
void OnSetInput(InputAction.CallbackContext context);
|
||||||
|
void OnCutLine(InputAction.CallbackContext context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Script.Gameplay.Facility;
|
using Script.Gameplay.Facility;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通用第一人称射线检测,获取玩家注视的 GameObject。
|
/// 通用第一人称射线检测,获取玩家注视的 GameObject。
|
||||||
|
@@ -2,7 +2,7 @@ using Core;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 玩家第一人称相机控制器
|
/// 玩家第一人称相机控制器
|
||||||
|
@@ -5,12 +5,13 @@ using Script.Gameplay.Connect;
|
|||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public class PlayerConnectController : MonoBehaviour
|
public class PlayerConnectController : MonoBehaviour
|
||||||
{
|
{
|
||||||
public bool IsEnableConnecting = true; // 是否启用连接功能
|
public bool IsEnableConnecting = true; // 是否启用连接功能
|
||||||
[SerializeField] private FirstPersonRaycaster raycaster; // 第一人称射线检测器
|
[SerializeField] private FirstPersonRaycaster raycaster; // 第一人称射线检测器
|
||||||
|
[SerializeField] private float maxConnectDistance = 10f; // 最大连接距离
|
||||||
|
|
||||||
private IConnectable currentTarget; // 当前注视的可连接对象
|
private IConnectable currentTarget; // 当前注视的可连接对象
|
||||||
private IConnectable previousGazedTarget; // 上一次注视的 IConnectable(用于触发进入/离开)
|
private IConnectable previousGazedTarget; // 上一次注视的 IConnectable(用于触发进入/离开)
|
||||||
@@ -18,15 +19,16 @@ namespace Gameplay.Player
|
|||||||
|
|
||||||
private IConnectable outTarget;
|
private IConnectable outTarget;
|
||||||
private IConnectable inputTarget;
|
private IConnectable inputTarget;
|
||||||
public event Action<IConnectable> OnSetOutputTarget;
|
public event Action<IConnectable> OnSetPointA;
|
||||||
public event Action<IConnectable> OnSetInputTarget;
|
public event Action<IConnectable> OnSetPointB;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
inputManager = InputManager.Instance;
|
inputManager = InputManager.Instance;
|
||||||
inputManager.Input.Player.SetOutput.performed += ctx => SetOutTarget(currentTarget);
|
inputManager.Input.Player.SetOutput.performed += ctx => SetPointA(currentTarget);
|
||||||
inputManager.Input.Player.SetInput.performed += ctx => SetInputTarget(currentTarget);
|
inputManager.Input.Player.SetInput.performed += ctx => SetPointB(currentTarget);
|
||||||
inputManager.Input.Player.Connect.performed += ctx => CreateConnection();
|
inputManager.Input.Player.Connect.performed += ctx => CreateConnection();
|
||||||
|
inputManager.Input.Player.CutLine.performed += ctx => CutConnectLine(currentTarget);
|
||||||
|
|
||||||
if (raycaster == null)
|
if (raycaster == null)
|
||||||
raycaster = GetComponent<FirstPersonRaycaster>() ?? GetComponentInChildren<FirstPersonRaycaster>();
|
raycaster = GetComponent<FirstPersonRaycaster>() ?? GetComponentInChildren<FirstPersonRaycaster>();
|
||||||
@@ -75,26 +77,27 @@ namespace Gameplay.Player
|
|||||||
return currentTarget;
|
return currentTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetOutTarget(IConnectable target)
|
public void SetPointA(IConnectable target)
|
||||||
{
|
{
|
||||||
if (target == null) return;
|
if (target == null) return;
|
||||||
if(!IsEnableConnecting) return;
|
if(!IsEnableConnecting) return;
|
||||||
if (!target.IsConnectedOutput)
|
outTarget = target;
|
||||||
{
|
OnSetPointA?.Invoke(outTarget);
|
||||||
outTarget = target;
|
|
||||||
OnSetOutputTarget?.Invoke(outTarget);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetInputTarget(IConnectable target)
|
public void SetPointB(IConnectable target)
|
||||||
{
|
{
|
||||||
if (target == null) return;
|
if (target == null) return;
|
||||||
if(!IsEnableConnecting) return;
|
if(!IsEnableConnecting) return;
|
||||||
if (!target.IsConnectedInput)
|
inputTarget = target;
|
||||||
{
|
OnSetPointB?.Invoke(inputTarget);
|
||||||
inputTarget = currentTarget;
|
}
|
||||||
OnSetInputTarget?.Invoke(inputTarget);
|
|
||||||
}
|
public void CutConnectLine(IConnectable target)
|
||||||
|
{
|
||||||
|
if (target == null) return;
|
||||||
|
if(!IsEnableConnecting) return;
|
||||||
|
ConnectionLineManager.Instance.CutTargetConnectionLines(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateConnection()
|
private void CreateConnection()
|
||||||
@@ -102,7 +105,16 @@ namespace Gameplay.Player
|
|||||||
if(!IsEnableConnecting) return;
|
if(!IsEnableConnecting) return;
|
||||||
if (outTarget != null && inputTarget != null && outTarget != inputTarget)
|
if (outTarget != null && inputTarget != null && outTarget != inputTarget)
|
||||||
{
|
{
|
||||||
|
//计算距离
|
||||||
|
float distance = Vector3.Distance(outTarget.GetPosition(), inputTarget.GetPosition());
|
||||||
|
if (distance > maxConnectDistance)
|
||||||
|
{
|
||||||
|
Debug.Log("Cannot create connection: targets are too far apart.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 创建连接线
|
||||||
ConnectionLine connectionLine = ConnectionLineManager.Instance.GenerateConnectionLine(outTarget, inputTarget);
|
ConnectionLine connectionLine = ConnectionLineManager.Instance.GenerateConnectionLine(outTarget, inputTarget);
|
||||||
|
|
||||||
// 重置信号目标
|
// 重置信号目标
|
||||||
outTarget = null;
|
outTarget = null;
|
||||||
inputTarget = null;
|
inputTarget = null;
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Gameplay.Player
|
|
||||||
{
|
|
||||||
public class PlayerConnectionLineController : MonoBehaviour
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e152f6521db343f3aac46c7c448491bc
|
|
||||||
timeCreated: 1760841639
|
|
@@ -1,13 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Gameplay;
|
|
||||||
using Script.Gameplay.Interface;
|
using Script.Gameplay.Interface;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Core;
|
using Core;
|
||||||
using Script.Gameplay.Global;
|
using Script.Gameplay.Global;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public class PlayerController : MonoBehaviour, IDamageable
|
public class PlayerController : MonoBehaviour, IDamageable
|
||||||
{
|
{
|
||||||
|
@@ -3,7 +3,7 @@ using UnityEngine;
|
|||||||
using Script.Gameplay.Interface;
|
using Script.Gameplay.Interface;
|
||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public class PlayerEditController:MonoBehaviour
|
public class PlayerEditController:MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@@ -3,7 +3,7 @@ using Script.Gameplay.Interface;
|
|||||||
using System;
|
using System;
|
||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public class PlayerInteractorController : MonoBehaviour
|
public class PlayerInteractorController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@@ -3,7 +3,7 @@ using Core;
|
|||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public class PlayerMoveController : MonoBehaviour
|
public class PlayerMoveController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@@ -4,7 +4,7 @@ using UnityEngine;
|
|||||||
using Core;
|
using Core;
|
||||||
using Script.Gameplay.Global;
|
using Script.Gameplay.Global;
|
||||||
|
|
||||||
namespace Gameplay.Player
|
namespace Script.Gameplay.Player
|
||||||
{
|
{
|
||||||
public enum WatchMode
|
public enum WatchMode
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Core;
|
using Core;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using Script.Gameplay.Connect;
|
using Script.Gameplay.Connect;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -23,8 +23,8 @@ namespace UI
|
|||||||
private void OnGetConnectController(PlayerConnectController controller)
|
private void OnGetConnectController(PlayerConnectController controller)
|
||||||
{
|
{
|
||||||
_playerConnectController = controller;
|
_playerConnectController = controller;
|
||||||
_playerConnectController.OnSetInputTarget += UpdateInputText;
|
_playerConnectController.OnSetPointB += UpdateInputText;
|
||||||
_playerConnectController.OnSetOutputTarget += UpdateOutputText;
|
_playerConnectController.OnSetPointA += UpdateOutputText;
|
||||||
UpdateInputText(null);
|
UpdateInputText(null);
|
||||||
UpdateOutputText(null);
|
UpdateOutputText(null);
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Core;
|
using Core;
|
||||||
using Script.Gameplay.Interface;
|
using Script.Gameplay.Interface;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using Script.Gameplay.Facility;
|
using Script.Gameplay.Facility;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Script.Gameplay.Input;
|
using Script.Gameplay.Input;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Core;
|
using Core;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Core;
|
using Core;
|
||||||
using Gameplay.Player;
|
using Script.Gameplay.Player;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
@@ -4,9 +4,10 @@ namespace UI
|
|||||||
{
|
{
|
||||||
public class StartGameButton : UIBase
|
public class StartGameButton : UIBase
|
||||||
{
|
{
|
||||||
|
public string levelName = "Level1";
|
||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
ScenesManager.Instance.LoadGameplay("Level1");
|
ScenesManager.Instance.LoadGameplay(levelName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -94,6 +94,15 @@
|
|||||||
"processors": "",
|
"processors": "",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"initialStateCheck": false
|
"initialStateCheck": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CutLine",
|
||||||
|
"type": "Button",
|
||||||
|
"id": "bf20e378-b5e0-4749-90b7-fc2aa09bd5c9",
|
||||||
|
"expectedControlType": "",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": "",
|
||||||
|
"initialStateCheck": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bindings": [
|
"bindings": [
|
||||||
@@ -250,6 +259,17 @@
|
|||||||
"action": "SetInput",
|
"action": "SetInput",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "53d79cef-a048-4b85-8078-03fcfeb79182",
|
||||||
|
"path": "<Keyboard>/x",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "CutLine",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -17,4 +17,7 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/Level1.unity
|
path: Assets/Scenes/Level1.unity
|
||||||
guid: 99c9720ab356a0642a771bea13969a05
|
guid: 99c9720ab356a0642a771bea13969a05
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Test.unity
|
||||||
|
guid: ba1c179ea1c89634a8d86462a3f693e2
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
Reference in New Issue
Block a user