Compare commits
5 Commits
9daa56a457
...
6ff684a71e
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ff684a71e | |||
| f71ef8cae9 | |||
| d3eed0945c | |||
| 4737220e42 | |||
| 56fab4ede4 |
File diff suppressed because one or more lines are too long
489
Assets/Prefab/UI/ReminderList.prefab
Normal file
489
Assets/Prefab/UI/ReminderList.prefab
Normal file
@@ -0,0 +1,489 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1372230259415100561
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 930174563945914406}
|
||||
- component: {fileID: 2700352142702063085}
|
||||
- component: {fileID: 3728831406991079081}
|
||||
m_Layer: 5
|
||||
m_Name: Interact
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &930174563945914406
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1372230259415100561}
|
||||
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: 1135667794185554838}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 150, y: -35}
|
||||
m_SizeDelta: {x: 300, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2700352142702063085
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1372230259415100561}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3728831406991079081
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1372230259415100561}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "F - \u4EA4\u4E92"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2}
|
||||
m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 25
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &1566038821549990303
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7955482942286597510}
|
||||
- component: {fileID: 5755484673904213804}
|
||||
- component: {fileID: 8654454823908621943}
|
||||
m_Layer: 5
|
||||
m_Name: Connect
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &7955482942286597510
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566038821549990303}
|
||||
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: 1135667794185554838}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 150, y: -175}
|
||||
m_SizeDelta: {x: 300, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5755484673904213804
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566038821549990303}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8654454823908621943
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1566038821549990303}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "C - \u8FDE\u63A5AB\u70B9"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2}
|
||||
m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 25
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5826797658906340627
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1135667794185554838}
|
||||
- component: {fileID: 5201496901608737276}
|
||||
- component: {fileID: 750214604344451669}
|
||||
m_Layer: 5
|
||||
m_Name: ReminderList
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1135667794185554838
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5826797658906340627}
|
||||
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: 930174563945914406}
|
||||
- {fileID: 1105326741592270637}
|
||||
- {fileID: 7955482942286597510}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -180, y: -180}
|
||||
m_SizeDelta: {x: 300, y: 300}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5201496901608737276
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5826797658906340627}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c8ca1a3e5bb84ffdb0f2e03f50e4a077, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
IsOpenOnFirstLoad: 1
|
||||
reminderInteractPrefab: {fileID: 1372230259415100561}
|
||||
reminderConnectPrefab: {fileID: 1566038821549990303}
|
||||
reminderSetPointPrefab: {fileID: 8649771482720941180}
|
||||
--- !u!114 &750214604344451669
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5826797658906340627}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 1
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!1 &8649771482720941180
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1105326741592270637}
|
||||
- component: {fileID: 1743228210522502908}
|
||||
- component: {fileID: 8217458606352480243}
|
||||
m_Layer: 5
|
||||
m_Name: Point
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1105326741592270637
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8649771482720941180}
|
||||
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: 1135667794185554838}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 150, y: -105}
|
||||
m_SizeDelta: {x: 300, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1743228210522502908
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8649771482720941180}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8217458606352480243
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8649771482720941180}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: "\u5DE6\u952E - \u8BBE\u7F6EA \n\u53F3\u952E - \u8BBE\u7F6EB"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2}
|
||||
m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 25
|
||||
m_fontSizeBase: 25
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
7
Assets/Prefab/UI/ReminderList.prefab.meta
Normal file
7
Assets/Prefab/UI/ReminderList.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c0c5fa3c0f3beb44a88c2312d9e1333
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -212,6 +212,130 @@ MonoBehaviour:
|
||||
m_PointerBehavior: 0
|
||||
m_CursorLockBehavior: 0
|
||||
m_ScrollDeltaPerTick: 6
|
||||
--- !u!1001 &120768279
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1067459529}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 300
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5826797658906340627, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ReminderList
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333, type: 3}
|
||||
--- !u!224 &120768280 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1135667794185554838, guid: 2c0c5fa3c0f3beb44a88c2312d9e1333,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 120768279}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!224 &165485610 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1276987115395320878, guid: faba7bc710ad07f4491499290cd8b296,
|
||||
@@ -253,7 +377,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 248, y: -59}
|
||||
m_AnchoredPosition: {x: 248, y: -60}
|
||||
m_SizeDelta: {x: 464.6504, y: 81.36188}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &257151346
|
||||
@@ -477,6 +601,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1082771939}
|
||||
- {fileID: 165485610}
|
||||
- {fileID: 120768280}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -744,7 +869,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -56}
|
||||
m_AnchoredPosition: {x: 0, y: -60}
|
||||
m_SizeDelta: {x: 459.7, y: 81.3619}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1349586408
|
||||
@@ -870,7 +995,7 @@ GameObject:
|
||||
- component: {fileID: 1439567736}
|
||||
- component: {fileID: 1439567735}
|
||||
m_Layer: 5
|
||||
m_Name: Output
|
||||
m_Name: PointA
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -915,7 +1040,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Output
|
||||
m_text: PointA
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2}
|
||||
m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5,
|
||||
@@ -1163,8 +1288,8 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
IsOpenOnFirstLoad: 0
|
||||
inputText: {fileID: 1852915598}
|
||||
outputText: {fileID: 1439567735}
|
||||
pointBText: {fileID: 1852915598}
|
||||
pointAText: {fileID: 1439567735}
|
||||
--- !u!1 &1852915596
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1177,7 +1302,7 @@ GameObject:
|
||||
- component: {fileID: 1852915599}
|
||||
- component: {fileID: 1852915598}
|
||||
m_Layer: 5
|
||||
m_Name: Input
|
||||
m_Name: PointB
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -1222,10 +1347,11 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Input
|
||||
m_text: PointB
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontAsset: {fileID: 11400000, guid: 538fd603dd2dddd4daf31aa55f44c7e5, type: 2}
|
||||
m_sharedMaterial: {fileID: -3917370665499528571, guid: 538fd603dd2dddd4daf31aa55f44c7e5,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace Script.Gameplay.Connect
|
||||
public void CutTargetConnectionLines(IConnectable target)
|
||||
{
|
||||
List<ConnectionLine> linesToRemove = new List<ConnectionLine>();
|
||||
foreach (var line in connectionLines)
|
||||
foreach (var line in target.ConnectionLines)
|
||||
{
|
||||
if (line != null && (line.Equals(target)))
|
||||
if (line != null)
|
||||
{
|
||||
linesToRemove.Add(line);
|
||||
}
|
||||
|
||||
@@ -48,14 +48,14 @@ namespace Script.Gameplay.Facility
|
||||
{
|
||||
// 逆时针旋转90度
|
||||
transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles + new Vector3(0, -90, 0));
|
||||
Debug.Log("Open door");
|
||||
// Debug.Log("Open door");
|
||||
}
|
||||
|
||||
private void CloseDoor()
|
||||
{
|
||||
// 顺时针旋转90度
|
||||
transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles + new Vector3(0, 90, 0));
|
||||
Debug.Log("Close door");
|
||||
// Debug.Log("Close door");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -9,11 +9,44 @@ namespace Script.Gameplay.Player
|
||||
{
|
||||
public class PlayerConnectController : MonoBehaviour
|
||||
{
|
||||
public bool IsEnableConnecting = true; // 是否启用连接功能
|
||||
private bool isEnableConnecting = false;
|
||||
public bool IsEnableConnecting
|
||||
{
|
||||
get => isEnableConnecting;
|
||||
set
|
||||
{
|
||||
isEnableConnecting = value;
|
||||
if (isEnableConnecting == false)
|
||||
{
|
||||
// 重置当前目标
|
||||
CurrentTarget = null;
|
||||
previousGazedTarget = null;
|
||||
outTarget = null;
|
||||
inputTarget = null;
|
||||
}
|
||||
}
|
||||
} // 是否启用连接功能
|
||||
[SerializeField] private FirstPersonRaycaster raycaster; // 第一人称射线检测器
|
||||
[SerializeField] private float maxConnectDistance = 10f; // 最大连接距离
|
||||
|
||||
private IConnectable currentTarget; // 当前注视的可连接对象
|
||||
private IConnectable currentTarget;
|
||||
public IConnectable CurrentTarget
|
||||
{
|
||||
get => currentTarget;
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
currentTarget = value;
|
||||
OnGazeEnter?.Invoke(currentTarget.GetGameObject());
|
||||
}
|
||||
else
|
||||
{
|
||||
OnGazeExit?.Invoke(null);
|
||||
}
|
||||
}
|
||||
} // 当前注视的可连接对象
|
||||
|
||||
private IConnectable previousGazedTarget; // 上一次注视的 IConnectable(用于触发进入/离开)
|
||||
private InputManager inputManager;
|
||||
|
||||
@@ -21,14 +54,16 @@ namespace Script.Gameplay.Player
|
||||
private IConnectable inputTarget;
|
||||
public event Action<IConnectable> OnSetPointA;
|
||||
public event Action<IConnectable> OnSetPointB;
|
||||
public event Action<GameObject> OnGazeEnter;
|
||||
public event Action<GameObject> OnGazeExit;
|
||||
|
||||
void Start()
|
||||
{
|
||||
inputManager = InputManager.Instance;
|
||||
inputManager.Input.Player.SetOutput.performed += ctx => SetPointA(currentTarget);
|
||||
inputManager.Input.Player.SetInput.performed += ctx => SetPointB(currentTarget);
|
||||
inputManager.Input.Player.SetOutput.performed += ctx => SetPointA(CurrentTarget);
|
||||
inputManager.Input.Player.SetInput.performed += ctx => SetPointB(CurrentTarget);
|
||||
inputManager.Input.Player.Connect.performed += ctx => CreateConnection();
|
||||
inputManager.Input.Player.CutLine.performed += ctx => CutConnectLine(currentTarget);
|
||||
inputManager.Input.Player.CutLine.performed += ctx => CutConnectLine(CurrentTarget);
|
||||
|
||||
if (raycaster == null)
|
||||
raycaster = GetComponent<FirstPersonRaycaster>() ?? GetComponentInChildren<FirstPersonRaycaster>();
|
||||
@@ -48,6 +83,7 @@ namespace Script.Gameplay.Player
|
||||
void DetectConnectable()
|
||||
{
|
||||
if (raycaster == null) return;
|
||||
if(!IsEnableConnecting) return;
|
||||
|
||||
GameObject lookAtObj = raycaster.CurrentLookAtObject;
|
||||
IConnectable hitConnectable = lookAtObj != null ? lookAtObj.GetComponent<IConnectable>() : null;
|
||||
@@ -68,13 +104,7 @@ namespace Script.Gameplay.Player
|
||||
previousGazedTarget = hitConnectable;
|
||||
}
|
||||
|
||||
currentTarget = hitConnectable;
|
||||
}
|
||||
|
||||
|
||||
public IConnectable GetCurrentTarget()
|
||||
{
|
||||
return currentTarget;
|
||||
CurrentTarget = hitConnectable;
|
||||
}
|
||||
|
||||
public void SetPointA(IConnectable target)
|
||||
|
||||
@@ -2,21 +2,30 @@ using Core;
|
||||
using UnityEngine;
|
||||
using Script.Gameplay.Interface;
|
||||
using Script.Gameplay.Input;
|
||||
using System;
|
||||
using Script.Gameplay.Global;
|
||||
|
||||
namespace Script.Gameplay.Player
|
||||
{
|
||||
public class PlayerEditController:MonoBehaviour
|
||||
public class PlayerEditController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private FirstPersonRaycaster raycaster; // 新增:第一人称射线检测器
|
||||
public bool IsEnableEditing = true; // 是否启用编辑功能
|
||||
private bool isEditing = false; // 当前是否处于编辑状态
|
||||
public event Action<IEditable> OnBeginEditTarget;
|
||||
public event Action<IEditable> OnEndEditTarget;
|
||||
|
||||
private IEditable currentTarget; // 射线命中的当前可编辑对象(用于按键交互)
|
||||
private IEditable previousGazedTarget; // 上一次注视的对象(用于注视进入/离开事件)
|
||||
|
||||
private InputManager inputManager;
|
||||
|
||||
private TimePauseManager timePauseManager;
|
||||
void Start()
|
||||
{
|
||||
inputManager = InputManager.Instance;
|
||||
inputManager.Input.Player.Edit.performed += context => EditTarget();
|
||||
timePauseManager = TimePauseManager.Instance;
|
||||
if (raycaster == null)
|
||||
raycaster = GetComponent<FirstPersonRaycaster>() ?? GetComponentInChildren<FirstPersonRaycaster>();
|
||||
if (raycaster == null)
|
||||
@@ -24,7 +33,6 @@ namespace Script.Gameplay.Player
|
||||
if (raycaster == null)
|
||||
Debug.LogWarning("FirstPersonRaycaster not found! Please assign or add it to the player.");
|
||||
ControllerLocator.Instance.Register(this);
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -62,6 +70,36 @@ namespace Script.Gameplay.Player
|
||||
return currentTarget;
|
||||
}
|
||||
|
||||
private void EditTarget()
|
||||
{
|
||||
if (isEditing)
|
||||
{
|
||||
isEditing = false;
|
||||
OnEndEditTarget?.Invoke(currentTarget);
|
||||
inputManager.SetCursorState(false, CursorLockMode.Locked);
|
||||
inputManager.SetInputForLook(true);
|
||||
inputManager.SetInputForMove(true);
|
||||
if (timePauseManager != null)
|
||||
{
|
||||
timePauseManager.SetPaused(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentTarget == null) return;
|
||||
if (!IsEnableEditing) return;
|
||||
isEditing = true;
|
||||
OnBeginEditTarget?.Invoke(currentTarget);
|
||||
inputManager.SetCursorState(true, CursorLockMode.Confined);
|
||||
inputManager.SetInputForLook(false);
|
||||
inputManager.SetInputForMove(false);
|
||||
if (timePauseManager != null)
|
||||
{
|
||||
timePauseManager.SetPaused(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
// 交由 FirstPersonRaycaster 绘制射线
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using Script.Gameplay.Interface;
|
||||
using System;
|
||||
using Core;
|
||||
using Script.Gameplay.Input;
|
||||
|
||||
namespace Script.Gameplay.Player
|
||||
@@ -10,9 +11,30 @@ namespace Script.Gameplay.Player
|
||||
[SerializeField] private FirstPersonRaycaster raycaster; // 新增:第一人称射线检测器
|
||||
[SerializeField] private bool isEnablePlayerInteraction = true; // 是否启用玩家交互功能
|
||||
|
||||
private IInteractable currentTarget; // 被射线命中的当前可交互对象(用于按键交互)
|
||||
private IInteractable currentTarget;
|
||||
private IInteractable CurrentTarget
|
||||
{
|
||||
get => currentTarget;
|
||||
set
|
||||
{
|
||||
currentTarget = value;
|
||||
if (currentTarget != null)
|
||||
{
|
||||
// 可以在这里添加一些逻辑,比如显示交互提示UI
|
||||
OnGazeEnter?.Invoke(this.gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 可以在这里隐藏交互提示UI
|
||||
OnGazeExit?.Invoke(this.gameObject);
|
||||
}
|
||||
}
|
||||
} // 被射线命中的当前可交互对象(用于按键交互)
|
||||
private IInteractable previousGazedTarget; // 上一次注视的对象(用于注视进入/离开事件)
|
||||
|
||||
public event Action<GameObject> OnGazeEnter;
|
||||
public event Action<GameObject> OnGazeExit;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (raycaster == null)
|
||||
@@ -25,11 +47,13 @@ namespace Script.Gameplay.Player
|
||||
var input = InputManager.Instance.Input;
|
||||
input.Player.Interact.performed += ctx =>
|
||||
{
|
||||
if (currentTarget != null)
|
||||
if (CurrentTarget != null)
|
||||
{
|
||||
currentTarget.Interact(this.gameObject);
|
||||
CurrentTarget.Interact(this.gameObject);
|
||||
}
|
||||
};
|
||||
|
||||
ControllerLocator.Instance.Register(this);
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -63,7 +87,7 @@ namespace Script.Gameplay.Player
|
||||
previousGazedTarget = hitInteractable;
|
||||
}
|
||||
|
||||
currentTarget = hitInteractable;
|
||||
CurrentTarget = hitInteractable;
|
||||
}
|
||||
|
||||
public void SetPlayerInteractionEnabled(bool isEnabled)
|
||||
@@ -73,7 +97,7 @@ namespace Script.Gameplay.Player
|
||||
{
|
||||
previousGazedTarget.OnGazeExit(this.gameObject);
|
||||
previousGazedTarget = null;
|
||||
currentTarget = null;
|
||||
CurrentTarget = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace Script.Gameplay.Player
|
||||
public enum WatchMode
|
||||
{
|
||||
Normal,
|
||||
Inside,
|
||||
Outside
|
||||
}
|
||||
|
||||
@@ -21,7 +20,7 @@ namespace Script.Gameplay.Player
|
||||
private InputManager inputManager;
|
||||
private TimePauseManager timePauseManager;
|
||||
private PlayerInteractorController playerInteractorController;
|
||||
private PlayerConnectController _playerConnectController;
|
||||
private PlayerConnectController playerConnectController;
|
||||
private WatchMode previousMode = WatchMode.Normal;
|
||||
private WatchMode currentMode = WatchMode.Normal;
|
||||
|
||||
@@ -45,17 +44,18 @@ namespace Script.Gameplay.Player
|
||||
inputManager = InputManager.Instance;
|
||||
timePauseManager = TimePauseManager.Instance;
|
||||
playerInteractorController = GetComponent<PlayerInteractorController>();
|
||||
_playerConnectController = GetComponent<PlayerConnectController>();
|
||||
playerConnectController = GetComponent<PlayerConnectController>();
|
||||
|
||||
var input = inputManager.Input;
|
||||
input.Player.SwitchWatchMode.performed += ctx =>
|
||||
{
|
||||
var modeTemp = (WatchMode)(((int)CurrentWatchMode + 1) % 3);
|
||||
var modeTemp = (WatchMode)(((int)CurrentWatchMode + 1) % Enum.GetNames(typeof(WatchMode)).Length);
|
||||
CurrentWatchMode = modeTemp;
|
||||
};
|
||||
;
|
||||
|
||||
ControllerLocator.Instance.Register(this);
|
||||
OnEnterWatchMode?.Invoke(currentMode);
|
||||
}
|
||||
|
||||
// 实现按Tap键实现在WatchMode 3个模式切换,并通过SwitchWatchMode设置正确的相机模式
|
||||
@@ -68,61 +68,31 @@ namespace Script.Gameplay.Player
|
||||
inputManager.SetCursorState(false, CursorLockMode.Locked);
|
||||
inputManager.SetInputForLook(true);
|
||||
inputManager.SetInputForMove(true);
|
||||
if (timePauseManager != null)
|
||||
{
|
||||
timePauseManager.SetPaused(false);
|
||||
}
|
||||
|
||||
if (playerInteractorController != null)
|
||||
{
|
||||
playerInteractorController.SetPlayerInteractionEnabled(true);
|
||||
}
|
||||
|
||||
if (_playerConnectController != null)
|
||||
if (playerConnectController != null)
|
||||
{
|
||||
_playerConnectController.IsEnableConnecting = false;
|
||||
playerConnectController.IsEnableConnecting = false;
|
||||
}
|
||||
|
||||
break;
|
||||
case WatchMode.Inside:
|
||||
SetSeeLines(false);
|
||||
inputManager.SetCursorState(true, CursorLockMode.Confined);
|
||||
inputManager.SetInputForLook(false);
|
||||
inputManager.SetInputForMove(false);
|
||||
if (timePauseManager != null)
|
||||
{
|
||||
timePauseManager.SetPaused(true);
|
||||
}
|
||||
|
||||
if (playerInteractorController != null)
|
||||
{
|
||||
playerInteractorController.SetPlayerInteractionEnabled(false);
|
||||
}
|
||||
|
||||
if (_playerConnectController != null)
|
||||
{
|
||||
_playerConnectController.IsEnableConnecting = false;
|
||||
}
|
||||
|
||||
break;
|
||||
case WatchMode.Outside:
|
||||
SetSeeLines(true);
|
||||
inputManager.SetCursorState(false, CursorLockMode.Locked);
|
||||
inputManager.SetInputForLook(true);
|
||||
inputManager.SetInputForMove(true);
|
||||
if (timePauseManager != null)
|
||||
{
|
||||
timePauseManager.SetPaused(false);
|
||||
}
|
||||
|
||||
if (playerInteractorController != null)
|
||||
{
|
||||
playerInteractorController.SetPlayerInteractionEnabled(true);
|
||||
}
|
||||
|
||||
if (_playerConnectController != null)
|
||||
if (playerConnectController != null)
|
||||
{
|
||||
_playerConnectController.IsEnableConnecting = true;
|
||||
playerConnectController.IsEnableConnecting = true;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -9,13 +9,14 @@ namespace UI
|
||||
{
|
||||
public class PlayerConnectViewer : UIBase
|
||||
{
|
||||
public TMP_Text inputText;
|
||||
public TMP_Text outputText;
|
||||
public TMP_Text pointBText;
|
||||
public TMP_Text pointAText;
|
||||
private PlayerConnectController _playerConnectController;
|
||||
private PlayerWatchModeController _playerWatchModeController;
|
||||
|
||||
private void Awake()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
ControllerLocator.Instance.TryGetWait<PlayerConnectController>(OnGetConnectController);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(OnGetWatchModeController);
|
||||
}
|
||||
@@ -32,18 +33,18 @@ namespace UI
|
||||
private void UpdateInputText(IConnectable input)
|
||||
{
|
||||
string text = input != null ? input.GetConnectableName() : "None";
|
||||
if (inputText != null)
|
||||
if (pointBText != null)
|
||||
{
|
||||
inputText.text = "Input: " + text;
|
||||
pointBText.text = "pointB: " + text;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateOutputText(IConnectable output)
|
||||
{
|
||||
string text = output != null ? output.GetConnectableName() : "None";
|
||||
if (outputText != null)
|
||||
if (pointAText != null)
|
||||
{
|
||||
outputText.text = "Output: " + text;
|
||||
pointAText.text = "pointA: " + text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Core;
|
||||
using Script.Gameplay.Interface;
|
||||
using Script.Gameplay.Player;
|
||||
using Script.Gameplay.Facility;
|
||||
using UnityEngine;
|
||||
using Script.Gameplay.Input;
|
||||
|
||||
@@ -13,36 +11,28 @@ namespace UI
|
||||
// 用于显示和编辑 Facility 上的各个 IEditComponent 组件的 UI 面板
|
||||
public class PlayerEditViewer : UIBase
|
||||
{
|
||||
private PlayerEditController controller;
|
||||
private PlayerWatchModeController watchModeController;
|
||||
private IEditable editable;
|
||||
private List<IEditableComponent> components = new List<IEditableComponent>();
|
||||
private List<EditableComponentViewer> componentViewers = new List<EditableComponentViewer>();
|
||||
[SerializeField] private GameObject componentEditViewerPrefab;
|
||||
[SerializeField] private GameObject noEditableTargetPanel;
|
||||
[SerializeField] private float panelRadius = 100f;
|
||||
|
||||
public List<EditableComponentViewer> componentViewers = new List<EditableComponentViewer>();
|
||||
private PlayerEditController editController;
|
||||
private InputManager inputManager;
|
||||
|
||||
private void Awake()
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
inputManager = InputManager.Instance;
|
||||
ControllerLocator.Instance.TryGetWait<PlayerEditController>(GetPlayerEditControllerHandle);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(GetPlayerWatchModeControllerHandle);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerEditController>(OnGetPlayerEditController);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
}
|
||||
|
||||
public void OnEnterInsideWatchMode()
|
||||
public void OnBeginEdit(IEditable target)
|
||||
{
|
||||
this.gameObject.SetActive(true);
|
||||
if (GetEditableFromController() != null)
|
||||
if (target != null)
|
||||
{
|
||||
GetEditableComponentsFromEditable();
|
||||
ClearComponentUI();
|
||||
GenerateComponentUI();
|
||||
GenerateComponentUI(GetEditableComponentsFromEditable(target));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -53,7 +43,7 @@ namespace UI
|
||||
}
|
||||
}
|
||||
|
||||
public void OnExitInsideWatchMode()
|
||||
public void OnEndEdit(IEditable target)
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
|
||||
@@ -65,50 +55,23 @@ namespace UI
|
||||
}
|
||||
|
||||
// 获取 PlayerEditController 的回调
|
||||
private void GetPlayerEditControllerHandle(PlayerEditController editController)
|
||||
private void OnGetPlayerEditController(PlayerEditController controller)
|
||||
{
|
||||
controller = editController;
|
||||
this.editController = controller;
|
||||
this.editController.OnBeginEditTarget += OnBeginEdit;
|
||||
this.editController.OnEndEditTarget += OnEndEdit;
|
||||
//Debug.Log("PlayerEditViewer obtained PlayerEditController.");
|
||||
}
|
||||
|
||||
// 获取 PlayerWatchModeController 的回调
|
||||
private void GetPlayerWatchModeControllerHandle(PlayerWatchModeController watchModeCtrl)
|
||||
private List<IEditableComponent> GetEditableComponentsFromEditable(IEditable target)
|
||||
{
|
||||
watchModeController = watchModeCtrl;
|
||||
watchModeController.OnEnterWatchMode += (WatchMode mode) =>
|
||||
if (target == null)
|
||||
{
|
||||
if (mode == WatchMode.Inside)
|
||||
OnEnterInsideWatchMode();
|
||||
};
|
||||
watchModeController.OnExitWatchMode += (WatchMode mode) =>
|
||||
{
|
||||
if (mode == WatchMode.Inside)
|
||||
OnExitInsideWatchMode();
|
||||
};
|
||||
|
||||
//Debug.Log("PlayerEditViewer subscribed to WatchMode events.");
|
||||
}
|
||||
|
||||
private IEditable GetEditableFromController()
|
||||
{
|
||||
if (controller == null)
|
||||
{
|
||||
Debug.Log($"controller is null in {nameof(PlayerEditViewer)}");
|
||||
Debug.Log($"editable is null in {nameof(PlayerEditViewer)}");
|
||||
return null;
|
||||
}
|
||||
|
||||
return editable = controller.GetCurrentTarget();
|
||||
}
|
||||
|
||||
private void GetEditableComponentsFromEditable()
|
||||
{
|
||||
if (editable == null)
|
||||
{
|
||||
Debug.Log($"editable is null in {nameof(PlayerEditViewer)}");
|
||||
return;
|
||||
}
|
||||
|
||||
components = editable.GetEditableComponents()
|
||||
return target.GetEditableComponents()
|
||||
.Where(c => c != null)
|
||||
.ToList();
|
||||
}
|
||||
@@ -128,7 +91,7 @@ namespace UI
|
||||
}
|
||||
|
||||
// 根据 components 生成 UI, 根据拥有的 IEditComponent 的数量动态生成 UI 元素。布局为环绕着面板中心排列(自适应间隔)。
|
||||
private void GenerateComponentUI()
|
||||
private void GenerateComponentUI(List<IEditableComponent> components)
|
||||
{
|
||||
if (components == null || components.Count == 0 || componentEditViewerPrefab == null) return;
|
||||
|
||||
|
||||
60
Assets/Script/Gameplay/UI/PlayerGazeReminder.cs
Normal file
60
Assets/Script/Gameplay/UI/PlayerGazeReminder.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
using Script.Gameplay.Player;
|
||||
using TMPro;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class PlayerGazeReminder : UIBase
|
||||
{
|
||||
[SerializeField] private GameObject reminderInteractPrefab;
|
||||
[SerializeField] private GameObject reminderConnectPrefab;
|
||||
[SerializeField] private GameObject reminderSetPointPrefab;
|
||||
private PlayerInteractorController playerInteractorController;
|
||||
private PlayerConnectController playerConnectController;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
ControllerLocator.Instance.TryGetWait<PlayerInteractorController>(OnGetInteractorController);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerConnectController>(OnGetConnectController);
|
||||
}
|
||||
|
||||
private void OnGetInteractorController(PlayerInteractorController controller)
|
||||
{
|
||||
playerInteractorController = controller;
|
||||
playerInteractorController.OnGazeEnter += HandleInteractGazeEnter;
|
||||
playerInteractorController.OnGazeExit += HandleInteractGazeExit;
|
||||
}
|
||||
|
||||
private void HandleInteractGazeEnter(GameObject obj)
|
||||
{
|
||||
reminderInteractPrefab.SetActive(true);
|
||||
}
|
||||
|
||||
private void HandleInteractGazeExit(GameObject obj)
|
||||
{
|
||||
reminderInteractPrefab.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnGetConnectController(PlayerConnectController controller)
|
||||
{
|
||||
playerConnectController = controller;
|
||||
playerConnectController.OnGazeEnter += HandleConnectGazeEnter;
|
||||
playerConnectController.OnGazeExit += HandleConnectGazeExit;
|
||||
}
|
||||
|
||||
private void HandleConnectGazeEnter(GameObject obj)
|
||||
{
|
||||
reminderConnectPrefab.SetActive(true);
|
||||
reminderSetPointPrefab.SetActive(true);
|
||||
}
|
||||
|
||||
private void HandleConnectGazeExit(GameObject obj)
|
||||
{
|
||||
reminderConnectPrefab.SetActive(false);
|
||||
reminderSetPointPrefab.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Script/Gameplay/UI/PlayerGazeReminder.cs.meta
Normal file
3
Assets/Script/Gameplay/UI/PlayerGazeReminder.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8ca1a3e5bb84ffdb0f2e03f50e4a077
|
||||
timeCreated: 1761008641
|
||||
Reference in New Issue
Block a user