mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Init TEngine4.0.0
Init TEngine4.0.0
This commit is contained in:
@@ -1,251 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1475230776375468740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479866941241332311}
|
||||
m_Layer: 5
|
||||
m_Name: ChallengePage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1479866941241332311
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1475230776375468740}
|
||||
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: 8010305276295475117}
|
||||
- {fileID: 1233927602220876479}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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!1 &3439056039408971598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8010305276295475117}
|
||||
- component: {fileID: 4037203910832260992}
|
||||
- component: {fileID: 2557980336716168277}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8010305276295475117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 0
|
||||
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!222 &4037203910832260992
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2557980336716168277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 0.8773585, g: 0.8773585, b: 0.8773585, 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: 0}
|
||||
m_Type: 0
|
||||
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!1 &9034770532344153216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1233927602220876479}
|
||||
- component: {fileID: 3089650554269551447}
|
||||
- component: {fileID: 6374603392436726921}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1233927602220876479
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 1
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3089650554269551447
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6374603392436726921
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 5
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5818f7e71cf6b7243bda0333f01725c5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d909f4465e8426642a7fe3f7170ec9ff
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,251 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1475230776375468740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479866941241332311}
|
||||
m_Layer: 5
|
||||
m_Name: HeroPage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1479866941241332311
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1475230776375468740}
|
||||
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: 8010305276295475117}
|
||||
- {fileID: 1233927602220876479}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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!1 &3439056039408971598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8010305276295475117}
|
||||
- component: {fileID: 4037203910832260992}
|
||||
- component: {fileID: 2557980336716168277}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8010305276295475117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 0
|
||||
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!222 &4037203910832260992
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2557980336716168277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 0.8773585, g: 0.8773585, b: 0.8773585, 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: 0}
|
||||
m_Type: 0
|
||||
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!1 &9034770532344153216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1233927602220876479}
|
||||
- component: {fileID: 3089650554269551447}
|
||||
- component: {fileID: 6374603392436726921}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1233927602220876479
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 1
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3089650554269551447
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6374603392436726921
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 4
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ad3380cbc56b534db059f5ab1c72c12
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,251 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1475230776375468740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479866941241332311}
|
||||
m_Layer: 5
|
||||
m_Name: MainLevelPage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1479866941241332311
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1475230776375468740}
|
||||
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: 8010305276295475117}
|
||||
- {fileID: 1233927602220876479}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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!1 &3439056039408971598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8010305276295475117}
|
||||
- component: {fileID: 4037203910832260992}
|
||||
- component: {fileID: 2557980336716168277}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8010305276295475117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 0
|
||||
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!222 &4037203910832260992
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2557980336716168277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 0.8773585, g: 0.8773585, b: 0.8773585, 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: 0}
|
||||
m_Type: 0
|
||||
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!1 &9034770532344153216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1233927602220876479}
|
||||
- component: {fileID: 3089650554269551447}
|
||||
- component: {fileID: 6374603392436726921}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1233927602220876479
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 1
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3089650554269551447
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6374603392436726921
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 3
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d22380accc72dab419befc135f600871
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,251 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1475230776375468740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479866941241332311}
|
||||
m_Layer: 5
|
||||
m_Name: ShopPage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1479866941241332311
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1475230776375468740}
|
||||
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: 8010305276295475117}
|
||||
- {fileID: 1233927602220876479}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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!1 &3439056039408971598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8010305276295475117}
|
||||
- component: {fileID: 4037203910832260992}
|
||||
- component: {fileID: 2557980336716168277}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8010305276295475117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 0
|
||||
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!222 &4037203910832260992
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2557980336716168277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 0.8773585, g: 0.8773585, b: 0.8773585, 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: 0}
|
||||
m_Type: 0
|
||||
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!1 &9034770532344153216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1233927602220876479}
|
||||
- component: {fileID: 3089650554269551447}
|
||||
- component: {fileID: 6374603392436726921}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1233927602220876479
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 1
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3089650554269551447
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6374603392436726921
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c126fd2ec7e13a94caa55ab197251e4b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,251 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1475230776375468740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479866941241332311}
|
||||
m_Layer: 5
|
||||
m_Name: ZhuJuePage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1479866941241332311
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1475230776375468740}
|
||||
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: 8010305276295475117}
|
||||
- {fileID: 1233927602220876479}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
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!1 &3439056039408971598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8010305276295475117}
|
||||
- component: {fileID: 4037203910832260992}
|
||||
- component: {fileID: 2557980336716168277}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8010305276295475117
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 0
|
||||
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!222 &4037203910832260992
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2557980336716168277
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3439056039408971598}
|
||||
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: 0.8773585, g: 0.8773585, b: 0.8773585, 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: 0}
|
||||
m_Type: 0
|
||||
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!1 &9034770532344153216
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1233927602220876479}
|
||||
- component: {fileID: 3089650554269551447}
|
||||
- component: {fileID: 6374603392436726921}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1233927602220876479
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 1479866941241332311}
|
||||
m_RootOrder: 1
|
||||
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: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3089650554269551447
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6374603392436726921
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9034770532344153216}
|
||||
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: 2
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 256
|
||||
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}
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b47b46f8f9298a4ebd20c9e5664b9e4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,16 +0,0 @@
|
||||
namespace GameBase
|
||||
{
|
||||
public class BaseClsTemplate<T>
|
||||
{
|
||||
protected static T Imp;
|
||||
|
||||
/// <summary>
|
||||
/// Unity工程,注册处理函数。
|
||||
/// </summary>
|
||||
/// <param name="imp">实现类。</param>
|
||||
public static void RegisterImp(T imp)
|
||||
{
|
||||
Imp = imp;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb7ef2f42b33ada47b3543dc7723fcb5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace TEngine
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class UpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class FixedUpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class LateUpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RoleLoginAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RoleLogoutAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80791cccf63d44faa348884ea0c506a2
|
||||
timeCreated: 1684553027
|
@@ -34,6 +34,47 @@ namespace TEngine
|
||||
}
|
||||
}
|
||||
|
||||
#region Attribute
|
||||
|
||||
/// <summary>
|
||||
/// 帧更新属性。
|
||||
/// <remarks>适用于BehaviourSingleton。</remarks>
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class UpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物理帧更新属性。
|
||||
/// <remarks>适用于BehaviourSingleton。</remarks>
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class FixedUpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后帧更新属性。
|
||||
/// <remarks>适用于BehaviourSingleton。</remarks>
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class LateUpdateAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RoleLoginAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RoleLogoutAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 基础Behaviour单例。
|
||||
/// <remarks>(抽象类)</remarks>
|
||||
@@ -97,7 +138,7 @@ namespace TEngine
|
||||
/// <summary>
|
||||
/// 通过LogicSys来驱动且具备Unity完整生命周期的驱动系统(不继承MonoBehaviour)。
|
||||
/// </summary>
|
||||
public class BehaviourSingleSystem : BaseLogicSys<BehaviourSingleSystem>
|
||||
public sealed class BehaviourSingleSystem : BaseLogicSys<BehaviourSingleSystem>
|
||||
{
|
||||
private readonly List<BaseBehaviourSingleton> _listInst = new List<BaseBehaviourSingleton>();
|
||||
private readonly List<BaseBehaviourSingleton> _listStart = new List<BaseBehaviourSingleton>();
|
||||
@@ -262,7 +303,6 @@ namespace TEngine
|
||||
private bool HadAttribute<T>(Type type) where T : Attribute
|
||||
{
|
||||
T attribute = Attribute.GetCustomAttribute(type, typeof(T)) as T;
|
||||
|
||||
return attribute != null;
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
namespace GameBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 用来在多线程下检测耗时。
|
||||
/// 用于检测耗时。
|
||||
/// </summary>
|
||||
public class GameTickWatcher
|
||||
{
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b062b3e32edd4536a4308a3d180842e0
|
||||
timeCreated: 1681989133
|
@@ -7,7 +7,7 @@ using UnityEngine.UI;
|
||||
namespace GameLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 红点个体行为
|
||||
/// 红点个体行为。
|
||||
/// </summary>
|
||||
public class RedNoteBehaviour : UIWidget
|
||||
{
|
||||
|
@@ -3,6 +3,9 @@ using System.Reflection;
|
||||
using GameBase;
|
||||
using TEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 游戏App。
|
||||
/// </summary>
|
||||
public partial class GameApp:Singleton<GameApp>
|
||||
{
|
||||
private static List<Assembly> _hotfixAssembly;
|
||||
@@ -24,6 +27,7 @@ public partial class GameApp:Singleton<GameApp>
|
||||
Utility.Unity.AddDestroyListener(Instance.OnDestroy);
|
||||
Utility.Unity.AddOnDrawGizmosListener(Instance.OnDrawGizmos);
|
||||
Utility.Unity.AddOnApplicationPauseListener(Instance.OnApplicationPause);
|
||||
GameModule.Procedure.RestartProcedure(new GameLogic.OnEnterGameAppProcedure());
|
||||
Instance.StartGameLogic();
|
||||
}
|
||||
|
||||
@@ -33,7 +37,7 @@ public partial class GameApp:Singleton<GameApp>
|
||||
/// </summary>
|
||||
private void StartGameLogic()
|
||||
{
|
||||
GameModule.UI.ShowUI<GameLogic.GameMainUI>();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@@ -18,8 +18,7 @@ public partial class GameApp
|
||||
/// </summary>
|
||||
private void InitSystemSetting()
|
||||
{
|
||||
Application.targetFrameRate = 120;
|
||||
Log.Warning("Set UnityEngine.Application.targetFrameRate = 120");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -36,7 +35,7 @@ public partial class GameApp
|
||||
/// </summary>
|
||||
/// <param name="logicSys">ILogicSys</param>
|
||||
/// <returns></returns>
|
||||
protected bool AddLogicSys(ILogicSys logicSys)
|
||||
private bool AddLogicSys(ILogicSys logicSys)
|
||||
{
|
||||
if (_listLogicMgr.Contains(logicSys))
|
||||
{
|
||||
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8914094b46cb447398954c1f4e459d3b
|
||||
timeCreated: 1695716057
|
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 750c210d8c3f4a3aa99db8a58aafff46
|
||||
timeCreated: 1695716057
|
@@ -1,104 +0,0 @@
|
||||
//namespace DentedPixel{
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
|
||||
public class LTDescrOptional
|
||||
{
|
||||
|
||||
public Transform toTrans { get; set; }
|
||||
public Vector3 point { get; set; }
|
||||
public Vector3 axis { get; set; }
|
||||
public float lastVal { get; set; }
|
||||
public Quaternion origRotation { get; set; }
|
||||
public LTBezierPath path { get; set; }
|
||||
public LTSpline spline { get; set; }
|
||||
public AnimationCurve animationCurve;
|
||||
public int initFrameCount;
|
||||
|
||||
public LTRect ltRect { get; set; } // maybe get rid of this eventually
|
||||
|
||||
public Action<float> onUpdateFloat { get; set; }
|
||||
public Action<float, float> onUpdateFloatRatio { get; set; }
|
||||
public Action<float, object> onUpdateFloatObject { get; set; }
|
||||
public Action<Vector2> onUpdateVector2 { get; set; }
|
||||
public Action<Vector3> onUpdateVector3 { get; set; }
|
||||
public Action<Vector3, object> onUpdateVector3Object { get; set; }
|
||||
public Action<Color> onUpdateColor { get; set; }
|
||||
public Action<Color, object> onUpdateColorObject { get; set; }
|
||||
public Action onComplete { get; set; }
|
||||
public Action<object> onCompleteObject { get; set; }
|
||||
public object onCompleteParam { get; set; }
|
||||
public object onUpdateParam { get; set; }
|
||||
public Action onStart { get; set; }
|
||||
|
||||
|
||||
// #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2
|
||||
// public SpriteRenderer spriteRen { get; set; }
|
||||
// #endif
|
||||
//
|
||||
// #if LEANTWEEN_1
|
||||
// public Hashtable optional;
|
||||
// #endif
|
||||
// #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_0_1 && !UNITY_4_1 && !UNITY_4_2 && !UNITY_4_3 && !UNITY_4_5
|
||||
// public RectTransform rectTransform;
|
||||
// public UnityEngine.UI.Text uiText;
|
||||
// public UnityEngine.UI.Image uiImage;
|
||||
// public UnityEngine.Sprite[] sprites;
|
||||
// #endif
|
||||
|
||||
|
||||
public void reset()
|
||||
{
|
||||
animationCurve = null;
|
||||
|
||||
this.onUpdateFloat = null;
|
||||
this.onUpdateFloatRatio = null;
|
||||
this.onUpdateVector2 = null;
|
||||
this.onUpdateVector3 = null;
|
||||
this.onUpdateFloatObject = null;
|
||||
this.onUpdateVector3Object = null;
|
||||
this.onUpdateColor = null;
|
||||
this.onComplete = null;
|
||||
this.onCompleteObject = null;
|
||||
this.onCompleteParam = null;
|
||||
this.onStart = null;
|
||||
|
||||
this.point = Vector3.zero;
|
||||
this.initFrameCount = 0;
|
||||
}
|
||||
|
||||
public void callOnUpdate(float val, float ratioPassed)
|
||||
{
|
||||
if (this.onUpdateFloat != null)
|
||||
this.onUpdateFloat(val);
|
||||
|
||||
if (this.onUpdateFloatRatio != null)
|
||||
{
|
||||
this.onUpdateFloatRatio(val, ratioPassed);
|
||||
}
|
||||
else if (this.onUpdateFloatObject != null)
|
||||
{
|
||||
this.onUpdateFloatObject(val, this.onUpdateParam);
|
||||
}
|
||||
else if (this.onUpdateVector3Object != null)
|
||||
{
|
||||
this.onUpdateVector3Object(LTDescr.newVect, this.onUpdateParam);
|
||||
}
|
||||
else if (this.onUpdateVector3 != null)
|
||||
{
|
||||
this.onUpdateVector3(LTDescr.newVect);
|
||||
}
|
||||
else if (this.onUpdateVector2 != null)
|
||||
{
|
||||
this.onUpdateVector2(new Vector2(LTDescr.newVect.x, LTDescr.newVect.y));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a9da37b87014b0eada8eccc57bf0279
|
||||
timeCreated: 1695716057
|
@@ -1,256 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Internal Representation of a Sequence<br>
|
||||
* <br>
|
||||
* <h4>Example:</h4>
|
||||
* var seq = LeanTween.sequence();<br>
|
||||
* seq.append(1f); <span style="color:gray">// delay everything one second</span><br>
|
||||
* seq.append( () => { <span style="color:gray">// fire an event before start</span><br>
|
||||
* Debug.Log("I have started");<br>
|
||||
* });<br>
|
||||
* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); <span style="color:gray">// do a tween</span><br>
|
||||
* seq.append( (object obj) => { <span style="color:gray">// fire event after tween</span><br>
|
||||
* var dict = obj as Dictionary<string,string>;<br>
|
||||
* Debug.Log("We are done now obj value:"+dict["hi"]);<br>
|
||||
* }, new Dictionary<string,string>(){ {"hi","sup"} } );<br>
|
||||
* @class LTSeq
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
public class LTSeq
|
||||
{
|
||||
|
||||
public LTSeq previous;
|
||||
|
||||
public LTSeq current;
|
||||
|
||||
public LTDescr tween;
|
||||
|
||||
public float totalDelay;
|
||||
|
||||
public float timeScale;
|
||||
|
||||
private int debugIter;
|
||||
|
||||
public uint counter;
|
||||
|
||||
public bool toggle = false;
|
||||
|
||||
private uint _id;
|
||||
|
||||
public int id
|
||||
{
|
||||
get
|
||||
{
|
||||
uint toId = _id | counter << 16;
|
||||
|
||||
/*uint backId = toId & 0xFFFF;
|
||||
uint backCounter = toId >> 16;
|
||||
if(_id!=backId || backCounter!=counter){
|
||||
Debug.LogError("BAD CONVERSION toId:"+_id);
|
||||
}*/
|
||||
|
||||
return (int) toId;
|
||||
}
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
previous = null;
|
||||
tween = null;
|
||||
totalDelay = 0f;
|
||||
}
|
||||
|
||||
public void init(uint id, uint global_counter)
|
||||
{
|
||||
reset();
|
||||
_id = id;
|
||||
|
||||
counter = global_counter;
|
||||
|
||||
this.current = this;
|
||||
}
|
||||
|
||||
private LTSeq addOn()
|
||||
{
|
||||
this.current.toggle = true;
|
||||
LTSeq lastCurrent = this.current;
|
||||
this.current = LeanTween.sequence(true);
|
||||
// Debug.Log("this.current:" + this.current.id + " lastCurrent:" + lastCurrent.id);
|
||||
this.current.previous = lastCurrent;
|
||||
lastCurrent.toggle = false;
|
||||
this.current.totalDelay = lastCurrent.totalDelay;
|
||||
this.current.debugIter = lastCurrent.debugIter + 1;
|
||||
return current;
|
||||
}
|
||||
|
||||
private float addPreviousDelays()
|
||||
{
|
||||
// Debug.Log("delay:"+delay+" count:"+this.current.count+" this.current.totalDelay:"+this.current.totalDelay);
|
||||
|
||||
LTSeq prev = this.current.previous;
|
||||
|
||||
if (prev != null && prev.tween != null)
|
||||
{
|
||||
return this.current.totalDelay + prev.tween.time;
|
||||
}
|
||||
return this.current.totalDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a time delay to the sequence
|
||||
* @method append (delay)
|
||||
* @param {float} delay:float amount of time to add to the sequence
|
||||
* @return {LTSeq} LTDescr an object that distinguishes the tween
|
||||
* var seq = LeanTween.sequence();<br>
|
||||
* seq.append(1f); // delay everything one second<br>
|
||||
* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween<br>
|
||||
*/
|
||||
|
||||
public LTSeq append(float delay)
|
||||
{
|
||||
this.current.totalDelay += delay;
|
||||
|
||||
return this.current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a time delay to the sequence
|
||||
* @method append (method)
|
||||
* @param {System.Action} callback:System.Action method you want to be called
|
||||
* @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to
|
||||
* @example
|
||||
* var seq = LeanTween.sequence();<br>
|
||||
* seq.append( () => { // fire an event before start<br>
|
||||
* Debug.Log("I have started");<br>
|
||||
* });<br>
|
||||
* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween<br>
|
||||
* seq.append( () => { // fire event after tween<br>
|
||||
* Debug.Log("We are done now");<br>
|
||||
* });;<br>
|
||||
*/
|
||||
|
||||
public LTSeq append(System.Action callback)
|
||||
{
|
||||
LTDescr newTween = LeanTween.delayedCall(0f, callback);
|
||||
// Debug.Log("newTween:" + newTween);
|
||||
return append(newTween);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a time delay to the sequence
|
||||
* @method add (method(object))
|
||||
* @param {System.Action} callback:System.Action method you want to be called
|
||||
* @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to
|
||||
* @example
|
||||
* var seq = LeanTween.sequence();<br>
|
||||
* seq.append( () => { // fire an event before start<br>
|
||||
* Debug.Log("I have started");<br>
|
||||
* });<br>
|
||||
* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween<br>
|
||||
* seq.append((object obj) => { // fire event after tween
|
||||
* var dict = obj as Dictionary<string,string>;
|
||||
* Debug.Log("We are done now obj value:"+dict["hi"]);
|
||||
* }, new Dictionary<string,string>(){ {"hi","sup"} } );
|
||||
*/
|
||||
|
||||
public LTSeq append(System.Action<object> callback, object obj)
|
||||
{
|
||||
append(LeanTween.delayedCall(0f, callback).setOnCompleteParam(obj));
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
public LTSeq append(GameObject gameObject, System.Action callback)
|
||||
{
|
||||
append(LeanTween.delayedCall(gameObject, 0f, callback));
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
public LTSeq append(GameObject gameObject, System.Action<object> callback, object obj)
|
||||
{
|
||||
append(LeanTween.delayedCall(gameObject, 0f, callback).setOnCompleteParam(obj));
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a sequencer object where you can easily chain together tweens and methods one after another
|
||||
*
|
||||
* @method add (tween)
|
||||
* @return {LTSeq} LTSeq an object that you can add tweens, methods and time on to
|
||||
* @example
|
||||
* var seq = LeanTween.sequence();<br>
|
||||
* seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a move tween<br>
|
||||
* seq.append( LeanTween.rotateAround( avatar1, Vector3.forward, 360f, 1f ) ); // then do a rotate tween<br>
|
||||
*/
|
||||
|
||||
public LTSeq append(LTDescr tween)
|
||||
{
|
||||
this.current.tween = tween;
|
||||
|
||||
// Debug.Log("tween:" + tween + " delay:" + this.current.totalDelay);
|
||||
|
||||
this.current.totalDelay = addPreviousDelays();
|
||||
|
||||
tween.setDelay(this.current.totalDelay);
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
public LTSeq insert(LTDescr tween)
|
||||
{
|
||||
this.current.tween = tween;
|
||||
|
||||
tween.setDelay(addPreviousDelays());
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
|
||||
public LTSeq setScale(float timeScale)
|
||||
{
|
||||
// Debug.Log("this.current:" + this.current.previous.debugIter+" tween:"+this.current.previous.tween);
|
||||
setScaleRecursive(this.current, timeScale, 500);
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
private void setScaleRecursive(LTSeq seq, float timeScale, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
this.timeScale = timeScale;
|
||||
|
||||
// Debug.Log("seq.count:" + count + " seq.tween:" + seq.tween);
|
||||
seq.totalDelay *= timeScale;
|
||||
if (seq.tween != null)
|
||||
{
|
||||
// Debug.Log("seq.tween.time * timeScale:" + seq.tween.time * timeScale + " seq.totalDelay:"+seq.totalDelay +" time:"+seq.tween.time+" seq.tween.delay:"+seq.tween.delay);
|
||||
if (seq.tween.time != 0f)
|
||||
seq.tween.setTime(seq.tween.time*timeScale);
|
||||
seq.tween.setDelay(seq.tween.delay*timeScale);
|
||||
}
|
||||
|
||||
if (seq.previous != null)
|
||||
setScaleRecursive(seq.previous, timeScale, count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public LTSeq reverse()
|
||||
{
|
||||
|
||||
return addOn();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7355a7aac6e49b3975763bf3eef477b
|
||||
timeCreated: 1695716057
|
@@ -1,418 +0,0 @@
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class LeanAudioStream {
|
||||
|
||||
public int position = 0;
|
||||
|
||||
public AudioClip audioClip;
|
||||
public float[] audioArr;
|
||||
|
||||
public LeanAudioStream( float[] audioArr ){
|
||||
this.audioArr = audioArr;
|
||||
}
|
||||
|
||||
public void OnAudioRead(float[] data) {
|
||||
int count = 0;
|
||||
while (count < data.Length) {
|
||||
data[count] = audioArr[this.position];
|
||||
position++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnAudioSetPosition(int newPosition) {
|
||||
this.position = newPosition;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Audio dynamically and easily playback
|
||||
*
|
||||
* @class LeanAudio
|
||||
* @constructor
|
||||
*/
|
||||
public class LeanAudio : object {
|
||||
|
||||
public static float MIN_FREQEUNCY_PERIOD = 0.000115f;
|
||||
public static int PROCESSING_ITERATIONS_MAX = 50000;
|
||||
public static float[] generatedWaveDistances;
|
||||
public static int generatedWaveDistancesCount = 0;
|
||||
|
||||
private static float[] longList;
|
||||
|
||||
public static LeanAudioOptions options(){
|
||||
if(generatedWaveDistances==null){
|
||||
generatedWaveDistances = new float[ PROCESSING_ITERATIONS_MAX ];
|
||||
longList = new float[ PROCESSING_ITERATIONS_MAX ];
|
||||
}
|
||||
return new LeanAudioOptions();
|
||||
}
|
||||
|
||||
public static LeanAudioStream createAudioStream( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options = null ){
|
||||
if(options==null)
|
||||
options = new LeanAudioOptions();
|
||||
|
||||
options.useSetData = false;
|
||||
|
||||
int generatedWavePtsLength = createAudioWave( volume, frequency, options);
|
||||
createAudioFromWave( generatedWavePtsLength, options );
|
||||
|
||||
return options.stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create dynamic audio from a set of Animation Curves and other options.
|
||||
*
|
||||
* @method createAudio
|
||||
* @param {AnimationCurve} volumeCurve:AnimationCurve describing the shape of the audios volume (from 0-1). The length of the audio is dicated by the end value here.
|
||||
* @param {AnimationCurve} frequencyCurve:AnimationCurve describing the width of the oscillations between the sound waves in seconds. Large numbers mean a lower note, while higher numbers mean a tighter frequency and therefor a higher note. Values are usually between 0.01 and 0.000001 (or smaller)
|
||||
* @param {LeanAudioOptions} options:LeanAudioOptions You can pass any other values in here like vibrato or the frequency you would like the sound to be encoded at. See <a href="LeanAudioOptions.html">LeanAudioOptions</a> for more details.
|
||||
* @return {AudioClip} AudioClip of the procedurally generated audio
|
||||
* @example
|
||||
* AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
|
||||
* AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
|
||||
* AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ));<br>
|
||||
*/
|
||||
public static AudioClip createAudio( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options = null ){
|
||||
if(options==null)
|
||||
options = new LeanAudioOptions();
|
||||
|
||||
int generatedWavePtsLength = createAudioWave( volume, frequency, options);
|
||||
// Debug.Log("generatedWavePtsLength:"+generatedWavePtsLength);
|
||||
return createAudioFromWave( generatedWavePtsLength, options );
|
||||
}
|
||||
|
||||
private static int createAudioWave( AnimationCurve volume, AnimationCurve frequency, LeanAudioOptions options ){
|
||||
float time = volume[ volume.length - 1 ].time;
|
||||
int listLength = 0;
|
||||
// List<float> list = new List<float>();
|
||||
|
||||
// generatedWaveDistances = new List<float>();
|
||||
// float[] vibratoValues = new float[ vibrato.Length ];
|
||||
float passed = 0f;
|
||||
for(int i = 0; i < PROCESSING_ITERATIONS_MAX; i++){
|
||||
float f = frequency.Evaluate(passed);
|
||||
if(f<MIN_FREQEUNCY_PERIOD)
|
||||
f = MIN_FREQEUNCY_PERIOD;
|
||||
float height = volume.Evaluate(passed + 0.5f*f);
|
||||
if(options.vibrato!=null){
|
||||
for(int j=0; j<options.vibrato.Length; j++){
|
||||
float peakMulti = Mathf.Abs( Mathf.Sin( 1.5708f + passed * (1f/options.vibrato[j][0]) * Mathf.PI ) );
|
||||
float diff = (1f-options.vibrato[j][1]);
|
||||
peakMulti = options.vibrato[j][1] + diff*peakMulti;
|
||||
height *= peakMulti;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Debug.Log("i:"+i+" f:"+f+" passed:"+passed+" height:"+height+" time:"+time);
|
||||
if(passed + 0.5f*f>=time)
|
||||
break;
|
||||
if(listLength >= PROCESSING_ITERATIONS_MAX-1){
|
||||
Debug.LogError("LeanAudio has reached it's processing cap. To avoid this error increase the number of iterations ex: LeanAudio.PROCESSING_ITERATIONS_MAX = "+(PROCESSING_ITERATIONS_MAX*2));
|
||||
break;
|
||||
}else{
|
||||
int distPoint = listLength / 2;
|
||||
|
||||
//generatedWaveDistances.Add( f );
|
||||
passed += f;
|
||||
|
||||
generatedWaveDistances[ distPoint ] = passed;
|
||||
//Debug.Log("distPoint:"+distPoint+" passed:"+passed);
|
||||
|
||||
//list.Add( passed );
|
||||
//list.Add( i%2==0 ? -height : height );
|
||||
|
||||
longList[ listLength ] = passed;
|
||||
longList[ listLength + 1 ] = i%2==0 ? -height : height;
|
||||
}
|
||||
|
||||
|
||||
|
||||
listLength += 2;
|
||||
|
||||
}
|
||||
|
||||
listLength += -2;
|
||||
generatedWaveDistancesCount = listLength / 2;
|
||||
|
||||
/*float[] wave = new float[ listLength ];
|
||||
for(int i = 0; i < wave.Length; i++){
|
||||
wave[i] = longList[i];
|
||||
}*/
|
||||
return listLength;
|
||||
}
|
||||
|
||||
private static AudioClip createAudioFromWave( int waveLength, LeanAudioOptions options ){
|
||||
float time = longList[ waveLength - 2 ];
|
||||
float[] audioArr = new float[ (int)(options.frequencyRate*time) ];
|
||||
|
||||
int waveIter = 0;
|
||||
float subWaveDiff = longList[waveIter];
|
||||
float subWaveTimeLast = 0f;
|
||||
float subWaveTime = longList[waveIter];
|
||||
float waveHeight = longList[waveIter+1];
|
||||
for(int i = 0; i < audioArr.Length; i++){
|
||||
float passedTime = (float)i / (float)options.frequencyRate;
|
||||
if(passedTime > longList[waveIter] ){
|
||||
subWaveTimeLast = longList[waveIter];
|
||||
waveIter += 2;
|
||||
subWaveDiff = longList[waveIter] - longList[waveIter-2];
|
||||
waveHeight = longList[waveIter+1];
|
||||
// Debug.Log("passed wave i:"+i);
|
||||
}
|
||||
subWaveTime = passedTime - subWaveTimeLast;
|
||||
float ratioElapsed = subWaveTime / subWaveDiff;
|
||||
|
||||
float value = Mathf.Sin( ratioElapsed * Mathf.PI );
|
||||
|
||||
if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Square){
|
||||
if(value>0f)
|
||||
value = 1f;
|
||||
if(value<0f)
|
||||
value = -1f;
|
||||
}else if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Sawtooth){
|
||||
float sign = value > 0f ? 1f : -1f;
|
||||
if(ratioElapsed<0.5f){
|
||||
value = (ratioElapsed*2f)*sign;
|
||||
}else{ // 0.5f - 1f
|
||||
value = (1f - ratioElapsed)*2f*sign;
|
||||
}
|
||||
}else if(options.waveStyle==LeanAudioOptions.LeanAudioWaveStyle.Noise){
|
||||
float peakMulti = (1f-options.waveNoiseInfluence) + Mathf.PerlinNoise(0f, passedTime * options.waveNoiseScale ) * options.waveNoiseInfluence;
|
||||
|
||||
/*if(i<25){
|
||||
Debug.Log("passedTime:"+passedTime+" peakMulti:"+peakMulti+" infl:"+options.waveNoiseInfluence);
|
||||
}*/
|
||||
|
||||
value *= peakMulti;
|
||||
}
|
||||
|
||||
//if(i<25)
|
||||
// Debug.Log("passedTime:"+passedTime+" value:"+value+" ratioElapsed:"+ratioElapsed+" subWaveTime:"+subWaveTime+" subWaveDiff:"+subWaveDiff);
|
||||
|
||||
value *= waveHeight;
|
||||
|
||||
|
||||
if(options.modulation!=null){
|
||||
for(int k=0; k<options.modulation.Length; k++){
|
||||
float peakMulti = Mathf.Abs( Mathf.Sin( 1.5708f + passedTime * (1f/options.modulation[k][0]) * Mathf.PI ) );
|
||||
float diff = (1f-options.modulation[k][1]);
|
||||
peakMulti = options.modulation[k][1] + diff*peakMulti;
|
||||
// if(k<10){
|
||||
// Debug.Log("k:"+k+" peakMulti:"+peakMulti+" value:"+value+" after:"+(value*peakMulti));
|
||||
// }
|
||||
value *= peakMulti;
|
||||
}
|
||||
}
|
||||
|
||||
audioArr[i] = value;
|
||||
// Debug.Log("pt:"+pt+" i:"+i+" val:"+audioArr[i]+" len:"+audioArr.Length);
|
||||
}
|
||||
|
||||
|
||||
int lengthSamples = audioArr.Length;
|
||||
|
||||
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7
|
||||
bool is3dSound = false;
|
||||
AudioClip audioClip = AudioClip.Create("Generated Audio", lengthSamples, 1, options.frequencyRate, is3dSound, false);
|
||||
#else
|
||||
AudioClip audioClip = null;
|
||||
if(options.useSetData){
|
||||
audioClip = AudioClip.Create("Generated Audio", lengthSamples, 1, options.frequencyRate, false, null, OnAudioSetPosition);
|
||||
audioClip.SetData(audioArr, 0);
|
||||
}else{
|
||||
options.stream = new LeanAudioStream(audioArr);
|
||||
// Debug.Log("len:"+audioArr.Length+" lengthSamples:"+lengthSamples+" freqRate:"+options.frequencyRate);
|
||||
audioClip = AudioClip.Create("Generated Audio", lengthSamples, 1, options.frequencyRate, false, options.stream.OnAudioRead, options.stream.OnAudioSetPosition);
|
||||
options.stream.audioClip = audioClip;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return audioClip;
|
||||
}
|
||||
|
||||
private static void OnAudioSetPosition(int newPosition) {
|
||||
|
||||
}
|
||||
|
||||
public static AudioClip generateAudioFromCurve( AnimationCurve curve, int frequencyRate = 44100 ){
|
||||
float curveTime = curve[ curve.length - 1 ].time;
|
||||
float time = curveTime;
|
||||
float[] audioArr = new float[ (int)(frequencyRate*time) ];
|
||||
|
||||
// Debug.Log("curveTime:"+curveTime+" AudioSettings.outputSampleRate:"+AudioSettings.outputSampleRate);
|
||||
for(int i = 0; i < audioArr.Length; i++){
|
||||
float pt = (float)i / (float)frequencyRate;
|
||||
audioArr[i] = curve.Evaluate( pt );
|
||||
// Debug.Log("pt:"+pt+" i:"+i+" val:"+audioArr[i]+" len:"+audioArr.Length);
|
||||
}
|
||||
|
||||
int lengthSamples = audioArr.Length;//(int)( (float)frequencyRate * curveTime );
|
||||
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7
|
||||
bool is3dSound = false;
|
||||
AudioClip audioClip = AudioClip.Create("Generated Audio", lengthSamples, 1, frequencyRate, is3dSound, false);
|
||||
#else
|
||||
AudioClip audioClip = AudioClip.Create("Generated Audio", lengthSamples, 1, frequencyRate, false);
|
||||
#endif
|
||||
audioClip.SetData(audioArr, 0);
|
||||
|
||||
return audioClip;
|
||||
}
|
||||
|
||||
public static AudioSource play( AudioClip audio, float volume ){
|
||||
AudioSource audioSource = playClipAt(audio, Vector3.zero);
|
||||
audioSource.volume = volume;
|
||||
return audioSource;
|
||||
}
|
||||
|
||||
public static AudioSource play( AudioClip audio ){
|
||||
return playClipAt( audio, Vector3.zero );
|
||||
}
|
||||
|
||||
public static AudioSource play( AudioClip audio, Vector3 pos ){
|
||||
return playClipAt( audio, pos );
|
||||
}
|
||||
|
||||
public static AudioSource play( AudioClip audio, Vector3 pos, float volume ){
|
||||
// Debug.Log("audio length:"+audio.length);
|
||||
AudioSource audioSource = playClipAt(audio, pos);
|
||||
audioSource.minDistance = 1f;
|
||||
//audioSource.pitch = pitch;
|
||||
audioSource.volume = volume;
|
||||
|
||||
return audioSource;
|
||||
}
|
||||
|
||||
public static AudioSource playClipAt( AudioClip clip, Vector3 pos ) {
|
||||
GameObject tempGO = new GameObject(); // create the temp object
|
||||
tempGO.transform.position = pos; // set its position
|
||||
AudioSource aSource = tempGO.AddComponent<AudioSource>(); // add an audio source
|
||||
aSource.clip = clip; // define the clip
|
||||
aSource.Play(); // start the sound
|
||||
GameObject.Destroy(tempGO, clip.length); // destroy object after clip duration
|
||||
return aSource; // return the AudioSource reference
|
||||
}
|
||||
|
||||
public static void printOutAudioClip( AudioClip audioClip, ref AnimationCurve curve, float scaleX = 1f ){
|
||||
// Debug.Log("Audio channels:"+audioClip.channels+" frequency:"+audioClip.frequency+" length:"+audioClip.length+" samples:"+audioClip.samples);
|
||||
float[] samples = new float[audioClip.samples * audioClip.channels];
|
||||
audioClip.GetData(samples, 0);
|
||||
int i = 0;
|
||||
|
||||
Keyframe[] frames = new Keyframe[samples.Length];
|
||||
while (i < samples.Length) {
|
||||
frames[i] = new Keyframe( (float)i * scaleX, samples[i] );
|
||||
++i;
|
||||
}
|
||||
curve = new AnimationCurve( frames );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pass in options to LeanAudio
|
||||
*
|
||||
* @class LeanAudioOptions
|
||||
* @constructor
|
||||
*/
|
||||
public class LeanAudioOptions : object {
|
||||
|
||||
public enum LeanAudioWaveStyle{
|
||||
Sine,
|
||||
Square,
|
||||
Sawtooth,
|
||||
Noise
|
||||
}
|
||||
|
||||
public LeanAudioWaveStyle waveStyle = LeanAudioWaveStyle.Sine;
|
||||
public Vector3[] vibrato;
|
||||
public Vector3[] modulation;
|
||||
public int frequencyRate = 44100;
|
||||
public float waveNoiseScale = 1000;
|
||||
public float waveNoiseInfluence = 1f;
|
||||
|
||||
public bool useSetData = true;
|
||||
public LeanAudioStream stream;
|
||||
|
||||
public LeanAudioOptions(){}
|
||||
|
||||
/**
|
||||
* Set the frequency for the audio is encoded. 44100 is CD quality, but you can usually get away with much lower (or use a lower amount to get a more 8-bit sound).
|
||||
*
|
||||
* @method setFrequency
|
||||
* @param {int} frequencyRate:int of the frequency you wish to encode the AudioClip at
|
||||
* @return {LeanAudioOptions} LeanAudioOptions describing optional values
|
||||
* @example
|
||||
* AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
|
||||
* AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
|
||||
* AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0f,0f)} ).setFrequency(12100) );<br>
|
||||
*/
|
||||
public LeanAudioOptions setFrequency( int frequencyRate ){
|
||||
this.frequencyRate = frequencyRate;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set details about the shape of the curve by adding vibrato modulations through it (alters the peak values giving it a wah-wah effect). You can add as many as you want to sculpt out more detail in the sound wave.
|
||||
*
|
||||
* @method setVibrato
|
||||
* @param {Vector3[]} vibratoArray:Vector3[] The first value is the period in seconds that you wish to have the vibrato wave fluctuate at. The second value is the minimum height you wish the vibrato wave to dip down to (default is zero). The third is reserved for future effects.
|
||||
* @return {LeanAudioOptions} LeanAudioOptions describing optional values
|
||||
* @example
|
||||
* AnimationCurve volumeCurve = new AnimationCurve( new Keyframe(0f, 1f, 0f, -1f), new Keyframe(1f, 0f, -1f, 0f));<br>
|
||||
* AnimationCurve frequencyCurve = new AnimationCurve( new Keyframe(0f, 0.003f, 0f, 0f), new Keyframe(1f, 0.003f, 0f, 0f));<br>
|
||||
* AudioClip audioClip = LeanAudio.createAudio(volumeCurve, frequencyCurve, LeanAudio.options().setVibrato( new Vector3[]{ new Vector3(0.32f,0.3f,0f)} ).setFrequency(12100) );<br>
|
||||
*/
|
||||
public LeanAudioOptions setVibrato( Vector3[] vibrato ){
|
||||
this.vibrato = vibrato;
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
public LeanAudioOptions setModulation( Vector3[] modulation ){
|
||||
this.modulation = modulation;
|
||||
return this;
|
||||
}*/
|
||||
|
||||
public LeanAudioOptions setWaveSine(){
|
||||
this.waveStyle = LeanAudioWaveStyle.Sine;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LeanAudioOptions setWaveSquare(){
|
||||
this.waveStyle = LeanAudioWaveStyle.Square;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LeanAudioOptions setWaveSawtooth(){
|
||||
this.waveStyle = LeanAudioWaveStyle.Sawtooth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LeanAudioOptions setWaveNoise(){
|
||||
this.waveStyle = LeanAudioWaveStyle.Noise;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LeanAudioOptions setWaveStyle( LeanAudioWaveStyle style ){
|
||||
this.waveStyle = style;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public LeanAudioOptions setWaveNoiseScale( float waveScale ){
|
||||
this.waveNoiseScale = waveScale;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LeanAudioOptions setWaveNoiseInfluence( float influence ){
|
||||
this.waveNoiseInfluence = influence;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5bb7206372dd4cc89563d963c6cafb0a
|
||||
timeCreated: 1695716057
|
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ac444c8e7c3469991e5da64eb2e8dc8
|
||||
timeCreated: 1695716057
|
@@ -1,545 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
|
||||
|
||||
public static class LeanTweenExt
|
||||
{
|
||||
//LeanTween.addListener
|
||||
//LeanTween.alpha
|
||||
public static LTDescr LeanAlpha(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.alpha(gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.alphaCanvas
|
||||
public static LTDescr LeanAlphaVertex(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.alphaVertex(gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.alpha (RectTransform)
|
||||
public static LTDescr LeanAlpha(this RectTransform rectTransform, float to, float time)
|
||||
{
|
||||
return LeanTween.alpha(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.alphaCanvas
|
||||
public static LTDescr LeanAlpha(this CanvasGroup canvas, float to, float time)
|
||||
{
|
||||
return LeanTween.alphaCanvas(canvas, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.alphaText
|
||||
public static LTDescr LeanAlphaText(this RectTransform rectTransform, float to, float time)
|
||||
{
|
||||
return LeanTween.alphaText(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.cancel
|
||||
public static void LeanCancel(this GameObject gameObject)
|
||||
{
|
||||
LeanTween.cancel(gameObject);
|
||||
}
|
||||
|
||||
public static void LeanCancel(this GameObject gameObject, bool callOnComplete)
|
||||
{
|
||||
LeanTween.cancel(gameObject, callOnComplete);
|
||||
}
|
||||
|
||||
public static void LeanCancel(this GameObject gameObject, int uniqueId, bool callOnComplete = false)
|
||||
{
|
||||
LeanTween.cancel(gameObject, uniqueId, callOnComplete);
|
||||
}
|
||||
|
||||
//LeanTween.cancel
|
||||
public static void LeanCancel(this RectTransform rectTransform)
|
||||
{
|
||||
LeanTween.cancel(rectTransform);
|
||||
}
|
||||
|
||||
//LeanTween.cancelAll
|
||||
//LeanTween.color
|
||||
public static LTDescr LeanColor(this GameObject gameObject, Color to, float time)
|
||||
{
|
||||
return LeanTween.color(gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.colorText
|
||||
public static LTDescr LeanColorText(this RectTransform rectTransform, Color to, float time)
|
||||
{
|
||||
return LeanTween.colorText(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.delayedCall
|
||||
public static LTDescr LeanDelayedCall(this GameObject gameObject, float delayTime, System.Action callback)
|
||||
{
|
||||
return LeanTween.delayedCall(gameObject, delayTime, callback);
|
||||
}
|
||||
|
||||
public static LTDescr LeanDelayedCall(this GameObject gameObject, float delayTime,
|
||||
System.Action<object> callback)
|
||||
{
|
||||
return LeanTween.delayedCall(gameObject, delayTime, callback);
|
||||
}
|
||||
|
||||
//LeanTween.isPaused
|
||||
public static bool LeanIsPaused(this GameObject gameObject)
|
||||
{
|
||||
return LeanTween.isPaused(gameObject);
|
||||
}
|
||||
|
||||
public static bool LeanIsPaused(this RectTransform rectTransform)
|
||||
{
|
||||
return LeanTween.isPaused(rectTransform);
|
||||
}
|
||||
|
||||
//LeanTween.isTweening
|
||||
public static bool LeanIsTweening(this GameObject gameObject)
|
||||
{
|
||||
return LeanTween.isTweening(gameObject);
|
||||
}
|
||||
|
||||
//LeanTween.isTweening
|
||||
//LeanTween.move
|
||||
public static LTDescr LeanMove(this GameObject gameObject, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.move(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this Transform transform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.move(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this RectTransform rectTransform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.move(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.move
|
||||
public static LTDescr LeanMove(this GameObject gameObject, Vector2 to, float time)
|
||||
{
|
||||
return LeanTween.move(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this Transform transform, Vector2 to, float time)
|
||||
{
|
||||
return LeanTween.move(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.move
|
||||
public static LTDescr LeanMove(this GameObject gameObject, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.move(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this GameObject gameObject, LTBezierPath to, float time)
|
||||
{
|
||||
return LeanTween.move(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this GameObject gameObject, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.move(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this Transform transform, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.move(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this Transform transform, LTBezierPath to, float time)
|
||||
{
|
||||
return LeanTween.move(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMove(this Transform transform, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.move(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveLocal
|
||||
public static LTDescr LeanMoveLocal(this GameObject gameObject, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocal(this GameObject gameObject, LTBezierPath to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocal(this GameObject gameObject, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocal(this Transform transform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocal(this Transform transform, LTBezierPath to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocal(this Transform transform, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveLocal
|
||||
public static LTDescr LeanMoveLocalX(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalX(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocalY(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalY(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocalZ(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalZ(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocalX(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalX(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocalY(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalY(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveLocalZ(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveLocalZ(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveSpline
|
||||
public static LTDescr LeanMoveSpline(this GameObject gameObject, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.moveSpline(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveSpline(this GameObject gameObject, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.moveSpline(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveSpline(this Transform transform, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.moveSpline(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveSpline(this Transform transform, LTSpline to, float time)
|
||||
{
|
||||
return LeanTween.moveSpline(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveSplineLocal
|
||||
public static LTDescr LeanMoveSplineLocal(this GameObject gameObject, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.moveSplineLocal(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveSplineLocal(this Transform transform, Vector3[] to, float time)
|
||||
{
|
||||
return LeanTween.moveSplineLocal(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveX
|
||||
public static LTDescr LeanMoveX(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveX(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveX(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveX(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveX (RectTransform)
|
||||
public static LTDescr LeanMoveX(this RectTransform rectTransform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveX(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveY
|
||||
public static LTDescr LeanMoveY(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveY(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveY(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveY(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveY (RectTransform)
|
||||
public static LTDescr LeanMoveY(this RectTransform rectTransform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveY(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveZ
|
||||
public static LTDescr LeanMoveZ(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.moveZ(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanMoveZ(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveZ(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.moveZ (RectTransform)
|
||||
public static LTDescr LeanMoveZ(this RectTransform rectTransform, float to, float time)
|
||||
{
|
||||
return LeanTween.moveZ(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.pause
|
||||
public static void LeanPause(this GameObject gameObject)
|
||||
{
|
||||
LeanTween.pause(gameObject);
|
||||
}
|
||||
|
||||
//LeanTween.play
|
||||
public static LTDescr LeanPlay(this RectTransform rectTransform, UnityEngine.Sprite[] sprites)
|
||||
{
|
||||
return LeanTween.play(rectTransform, sprites);
|
||||
}
|
||||
|
||||
//LeanTween.removeListener
|
||||
//LeanTween.resume
|
||||
public static void LeanResume(this GameObject gameObject)
|
||||
{
|
||||
LeanTween.resume(gameObject);
|
||||
}
|
||||
|
||||
//LeanTween.resumeAll
|
||||
//LeanTween.rotate
|
||||
public static LTDescr LeanRotate(this GameObject gameObject, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.rotate(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotate(this Transform transform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.rotate(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotate
|
||||
//LeanTween.rotate (RectTransform)
|
||||
public static LTDescr LeanRotate(this RectTransform rectTransform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.rotate(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateAround
|
||||
public static LTDescr LeanRotateAround(this GameObject gameObject, Vector3 axis, float add, float time)
|
||||
{
|
||||
return LeanTween.rotateAround(gameObject, axis, add, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotateAround(this Transform transform, Vector3 axis, float add, float time)
|
||||
{
|
||||
return LeanTween.rotateAround(transform.gameObject, axis, add, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateAround (RectTransform)
|
||||
public static LTDescr LeanRotateAround(this RectTransform rectTransform, Vector3 axis, float add, float time)
|
||||
{
|
||||
return LeanTween.rotateAround(rectTransform, axis, add, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateAroundLocal
|
||||
public static LTDescr LeanRotateAroundLocal(this GameObject gameObject, Vector3 axis, float add, float time)
|
||||
{
|
||||
return LeanTween.rotateAroundLocal(gameObject, axis, add, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotateAroundLocal(this Transform transform, Vector3 axis, float add, float time)
|
||||
{
|
||||
return LeanTween.rotateAroundLocal(transform.gameObject, axis, add, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateAround (RectTransform)
|
||||
public static LTDescr LeanRotateAroundLocal(this RectTransform rectTransform, Vector3 axis, float add,
|
||||
float time)
|
||||
{
|
||||
return LeanTween.rotateAroundLocal(rectTransform, axis, add, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateLocal
|
||||
//LeanTween.rotateX
|
||||
public static LTDescr LeanRotateX(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateX(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotateX(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateX(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateY
|
||||
public static LTDescr LeanRotateY(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateY(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotateY(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateY(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.rotateZ
|
||||
public static LTDescr LeanRotateZ(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateZ(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanRotateZ(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.rotateZ(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.scale
|
||||
public static LTDescr LeanScale(this GameObject gameObject, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.scale(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanScale(this Transform transform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.scale(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.scale (GUI)
|
||||
//LeanTween.scale (RectTransform)
|
||||
public static LTDescr LeanScale(this RectTransform rectTransform, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.scale(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.scaleX
|
||||
public static LTDescr LeanScaleX(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleX(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanScaleX(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleX(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.scaleY
|
||||
public static LTDescr LeanScaleY(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleY(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanScaleY(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleY(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.scaleZ
|
||||
public static LTDescr LeanScaleZ(this GameObject gameObject, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleZ(gameObject, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanScaleZ(this Transform transform, float to, float time)
|
||||
{
|
||||
return LeanTween.scaleZ(transform.gameObject, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.sequence
|
||||
//LeanTween.size (RectTransform)
|
||||
public static LTDescr LeanSize(this RectTransform rectTransform, Vector2 to, float time)
|
||||
{
|
||||
return LeanTween.size(rectTransform, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.tweensRunning
|
||||
//LeanTween.value (Color)
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Color from, Color to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, from, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.value (Color)
|
||||
//LeanTween.value (float)
|
||||
public static LTDescr LeanValue(this GameObject gameObject, float from, float to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Vector2 from, Vector2 to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Vector3 from, Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, from, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.value (float)
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<float> callOnUpdate, float from, float to,
|
||||
float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<float, float> callOnUpdate, float from,
|
||||
float to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<float, object> callOnUpdate, float from,
|
||||
float to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<Color> callOnUpdate, Color from, Color to,
|
||||
float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<Vector2> callOnUpdate, Vector2 from,
|
||||
Vector2 to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
public static LTDescr LeanValue(this GameObject gameObject, Action<Vector3> callOnUpdate, Vector3 from,
|
||||
Vector3 to, float time)
|
||||
{
|
||||
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||
}
|
||||
|
||||
//LeanTween.value (float)
|
||||
//LeanTween.value (float, object)
|
||||
//LeanTween.value (Vector2)
|
||||
//LeanTween.value (Vector2)
|
||||
//LeanTween.value (Vector3)
|
||||
//LeanTween.value (Vector3)
|
||||
}
|
||||
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daeb8c5e355b4ff7b8d888e532b9f6a5
|
||||
timeCreated: 1695716057
|
@@ -0,0 +1,13 @@
|
||||
using TEngine;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public class OnEnterGameAppProcedure : ProcedureBase
|
||||
{
|
||||
protected override void OnEnter(IFsm<IProcedureManager> procedureOwner)
|
||||
{
|
||||
base.OnEnter(procedureOwner);
|
||||
Log.Debug("OnEnter GameApp Procedure");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d724ef97b0234d48a2690c722a441af1
|
||||
timeCreated: 1696750677
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58574759ecba406ebb5275c9dfc0522b
|
||||
timeCreated: 1695711305
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 850ce87449ea43ef8d72abe3d386e4db
|
||||
timeCreated: 1695711314
|
@@ -1,703 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using TEngine;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
//定义的顺序跟游戏中实际的顺序是一致的(从左到右依次是商店、英雄、战斗、天赋、活动(玩法)...等)
|
||||
public enum GameMainButton
|
||||
{
|
||||
//商店
|
||||
BtnShop = 0,
|
||||
|
||||
//英雄
|
||||
BtnHero,
|
||||
|
||||
//主界面
|
||||
BtnFight,
|
||||
|
||||
////天赋
|
||||
//BtnTalent,
|
||||
//主角
|
||||
BtnZhuJue,
|
||||
|
||||
//活动(玩法)
|
||||
BtnActivity,
|
||||
|
||||
BtnMax,
|
||||
}
|
||||
|
||||
[Window(UILayer.UI, fullScreen: true)]
|
||||
public class GameMainUI : UIWindow
|
||||
{
|
||||
#region 声明
|
||||
|
||||
private int m_curIndex; //当前选择的按钮索引
|
||||
private int m_lastIndex; //上一次选择的按钮索引
|
||||
private const float m_aniTime = 0.2f; //按钮上下移动时间
|
||||
private const int m_checkThesHold = 100; //拖拽阈值
|
||||
private UICenterOnChild m_centerOnChild = new UICenterOnChild();
|
||||
private Dictionary<GameMainButton, GameObject> m_btnDic = new Dictionary<GameMainButton, GameObject>();
|
||||
private Dictionary<GameMainButton, Image> m_btnImgDic = new Dictionary<GameMainButton, Image>();
|
||||
private Dictionary<GameMainButton, TextMeshProUGUI> m_btnTextDic = new Dictionary<GameMainButton, TextMeshProUGUI>();
|
||||
private Dictionary<GameMainButton, TextMeshProUGUI> m_btnActiveTextDic = new Dictionary<GameMainButton, TextMeshProUGUI>();
|
||||
private Dictionary<GameMainButton, Image> m_btnLockDic = new Dictionary<GameMainButton, Image>();
|
||||
private Dictionary<GameMainButton, Transform> m_btnRedPointDict = new Dictionary<GameMainButton, Transform>();
|
||||
|
||||
private Vector2 m_tempV2 = new Vector2();
|
||||
private float m_curScaleRatio = 0.9f;
|
||||
private float m_lastScaleRatio = 0.8f;
|
||||
//private HomeChatInfoBlock m_homeChat;
|
||||
|
||||
private float m_cellSize;
|
||||
|
||||
#endregion
|
||||
|
||||
private Dictionary<GameMainButton, HomeChildPage> m_dictHomeChilds = new Dictionary<GameMainButton, HomeChildPage>();
|
||||
private List<HomeChildPage> m_listHomeChilds = new List<HomeChildPage>();
|
||||
private GridLayoutGroup m_gridContent;
|
||||
private Image m_imgActivityTips;
|
||||
private Text m_textActivityTips;
|
||||
|
||||
#region 脚本工具生成的代码
|
||||
|
||||
private RectTransform m_rectInfo;
|
||||
private ScrollRect m_scrollView;
|
||||
private RectTransform m_rectContent;
|
||||
private Image m_imgCheck;
|
||||
private GridLayoutGroup m_rectbtns;
|
||||
private Button m_btnShop;
|
||||
private Transform m_tfShopRed;
|
||||
private Button m_btnHero;
|
||||
private Transform m_tfHeroRed;
|
||||
private Button m_btnFight;
|
||||
private Button m_btnZhuJue;
|
||||
private Transform m_tfZhuJueRed;
|
||||
private Button m_btnActivity;
|
||||
private Transform m_tfActivityRed;
|
||||
private GameObject m_goMask;
|
||||
private Button m_btnGm;
|
||||
private Button m_btnhomeChatMsg;
|
||||
private GameObject m_goChat;
|
||||
private Image m_dimgType;
|
||||
private Text m_textChannlType;
|
||||
private Image m_dimgSex;
|
||||
private GameObject m_goEmpty;
|
||||
private Image m_imgbkg;
|
||||
|
||||
public override void ScriptGenerator()
|
||||
{
|
||||
m_imgbkg = FindChildComponent<Image>("m_imgbkg");
|
||||
m_rectInfo = FindChildComponent<RectTransform>("TopLayout/m_rectInfo");
|
||||
m_scrollView = FindChildComponent<ScrollRect>("TopLayout/m_rectInfo/m_scrollView");
|
||||
m_rectContent = FindChildComponent<RectTransform>("TopLayout/m_rectInfo/m_scrollView/Viewport/m_rectContent");
|
||||
m_imgCheck = FindChildComponent<Image>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_imgCheck");
|
||||
m_rectbtns = FindChildComponent<GridLayoutGroup>("TopLayout/m_rectInfo/bottom/m_rectbtns");
|
||||
m_btnShop = FindChildComponent<Button>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnShop");
|
||||
|
||||
m_tfShopRed = FindChild("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnShop/m_tfShopRed");
|
||||
m_btnHero = FindChildComponent<Button>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnHero");
|
||||
m_tfHeroRed = FindChild("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnHero/m_tfHeroRed");
|
||||
m_btnFight = FindChildComponent<Button>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnFight");
|
||||
m_btnActivity = FindChildComponent<Button>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnActivity");
|
||||
m_tfActivityRed = FindChild("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnActivity/m_tfActivityRed");
|
||||
m_btnZhuJue = FindChildComponent<Button>("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnZhuJue");
|
||||
m_tfZhuJueRed = FindChild("TopLayout/m_rectInfo/bottom/m_rectbtns/m_btnZhuJue/m_tfZhuJueRed");
|
||||
m_goMask = FindChild("TopLayout/m_rectInfo/m_goMask").gameObject;
|
||||
m_btnGm = FindChildComponent<Button>("TopLayout/m_rectInfo/m_btnGm");
|
||||
m_btnShop.onClick.AddListener(OnClickShopBtn);
|
||||
m_btnHero.onClick.AddListener(OnClickHeroBtn);
|
||||
m_btnFight.onClick.AddListener(OnClickFightBtn);
|
||||
m_btnZhuJue.onClick.AddListener(OnClickZhuJueBtn);
|
||||
m_btnActivity.onClick.AddListener(OnClickActivityBtn);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void BindMemberProperty()
|
||||
{
|
||||
m_gridContent = m_rectContent.GetComponent<GridLayoutGroup>();
|
||||
|
||||
//商店
|
||||
m_btnDic.Add(GameMainButton.BtnShop, m_btnShop.gameObject);
|
||||
m_btnImgDic.Add(GameMainButton.BtnShop, FindChildComponent<Image>(m_btnShop.transform, "m_imgIcon"));
|
||||
m_btnTextDic.Add(GameMainButton.BtnShop, FindChildComponent<TextMeshProUGUI>(m_btnShop.transform, "m_textName"));
|
||||
m_btnLockDic.Add(GameMainButton.BtnShop, FindChildComponent<Image>(m_btnShop.transform, "m_imgLock"));
|
||||
m_btnRedPointDict.Add(GameMainButton.BtnShop, m_tfShopRed);
|
||||
m_btnActiveTextDic.Add(GameMainButton.BtnShop, FindChildComponent<TextMeshProUGUI>(m_btnShop.transform, "m_textActiveName"));
|
||||
// m_shopRedEffGo = CreateUIEffect((uint)CommonEffectID.EffectRedPoint, m_tfShopRed);
|
||||
|
||||
//英雄
|
||||
m_btnDic.Add(GameMainButton.BtnHero, m_btnHero.gameObject);
|
||||
m_btnImgDic.Add(GameMainButton.BtnHero, FindChildComponent<Image>(m_btnHero.transform, "m_imgIcon"));
|
||||
m_btnTextDic.Add(GameMainButton.BtnHero, FindChildComponent<TextMeshProUGUI>(m_btnHero.transform, "m_textName"));
|
||||
m_btnLockDic.Add(GameMainButton.BtnHero, FindChildComponent<Image>(m_btnHero.transform, "m_imgLock"));
|
||||
m_btnActiveTextDic.Add(GameMainButton.BtnHero, FindChildComponent<TextMeshProUGUI>(m_btnHero.transform, "m_textActiveName"));
|
||||
m_btnRedPointDict.Add(GameMainButton.BtnHero, m_tfHeroRed);
|
||||
// m_heroRedEffGo = CreateUIEffect((uint)CommonEffectID.EffectRedPoint, m_tfHeroRed);
|
||||
|
||||
//战斗
|
||||
m_btnDic.Add(GameMainButton.BtnFight, m_btnFight.gameObject);
|
||||
m_btnImgDic.Add(GameMainButton.BtnFight, FindChildComponent<Image>(m_btnFight.transform, "m_imgIcon"));
|
||||
m_btnTextDic.Add(GameMainButton.BtnFight, FindChildComponent<TextMeshProUGUI>(m_btnFight.transform, "m_textName"));
|
||||
m_btnLockDic.Add(GameMainButton.BtnFight, FindChildComponent<Image>(m_btnFight.transform, "m_imgLock"));
|
||||
m_btnActiveTextDic.Add(GameMainButton.BtnFight, FindChildComponent<TextMeshProUGUI>(m_btnFight.transform, "m_textActiveName"));
|
||||
|
||||
////天赋
|
||||
//m_btnDic.Add(GameMainButton.BtnTalent, m_btnTalent.gameObject);
|
||||
//m_btnImgDic.Add(GameMainButton.BtnTalent, FindChildComponent<Image>(m_btnTalent.transform, "m_imgIcon"));
|
||||
//m_btnTextDic.Add(GameMainButton.BtnTalent, FindChildComponent<TextMeshProUGUI>(m_btnTalent.transform, "m_textName"));
|
||||
//m_btnLockDic.Add(GameMainButton.BtnTalent, FindChildComponent<Image>(m_btnTalent.transform, "m_imgLock"));
|
||||
//m_btnRedPointDict.Add(GameMainButton.BtnTalent, m_tfTalentRed);
|
||||
//m_talentRedEffGo = CreateUIEffect((uint)CommonEffectID.EffectRedPoint, m_tfTalentRed);
|
||||
|
||||
//主角
|
||||
m_btnDic.Add(GameMainButton.BtnZhuJue, m_btnZhuJue.gameObject);
|
||||
m_btnImgDic.Add(GameMainButton.BtnZhuJue, FindChildComponent<Image>(m_btnZhuJue.transform, "m_imgIcon"));
|
||||
m_btnTextDic.Add(GameMainButton.BtnZhuJue, FindChildComponent<TextMeshProUGUI>(m_btnZhuJue.transform, "m_textName"));
|
||||
m_btnLockDic.Add(GameMainButton.BtnZhuJue, FindChildComponent<Image>(m_btnZhuJue.transform, "m_imgLock"));
|
||||
m_btnActiveTextDic.Add(GameMainButton.BtnZhuJue, FindChildComponent<TextMeshProUGUI>(m_btnZhuJue.transform, "m_textActiveName"));
|
||||
m_btnRedPointDict.Add(GameMainButton.BtnZhuJue, m_tfZhuJueRed);
|
||||
// m_zhujueRedEffGo = CreateUIEffect((uint)CommonEffectID.EffectRedPoint, m_tfZhuJueRed);
|
||||
|
||||
//活动
|
||||
m_btnDic.Add(GameMainButton.BtnActivity, m_btnActivity.gameObject);
|
||||
m_btnImgDic.Add(GameMainButton.BtnActivity, FindChildComponent<Image>(m_btnActivity.transform, "m_imgIcon"));
|
||||
m_btnTextDic.Add(GameMainButton.BtnActivity, FindChildComponent<TextMeshProUGUI>(m_btnActivity.transform, "m_textName"));
|
||||
m_btnLockDic.Add(GameMainButton.BtnActivity, FindChildComponent<Image>(m_btnActivity.transform, "m_imgLock"));
|
||||
m_btnActiveTextDic.Add(GameMainButton.BtnActivity, FindChildComponent<TextMeshProUGUI>(m_btnActivity.transform, "m_textActiveName"));
|
||||
m_btnRedPointDict.Add(GameMainButton.BtnActivity, m_tfActivityRed);
|
||||
// m_activeRedEffGo = CreateUIEffect((uint)CommonEffectID.EffectRedPoint, m_tfActivityRed);
|
||||
|
||||
// //头顶的信息栏位
|
||||
// CreateWidgetByType<CurrencyDisplayBlock>(transform, "TopLayout/m_rectInfo");
|
||||
|
||||
m_imgActivityTips = FindChildComponent<Image>(m_btnActivity.transform, "m_imgActivityTips");
|
||||
if (m_imgActivityTips != null)
|
||||
{
|
||||
m_textActivityTips = FindChildComponent<Text>(m_imgActivityTips.transform, "m_textActivityTips");
|
||||
if (m_textActivityTips != null)
|
||||
{
|
||||
// m_textActivityTips.text = TextConfigMgr.Instance.GetText(TextDefine.ID_LABEL_WORLD_BOOS_ACTIVITY_OPEN_TIPS);
|
||||
}
|
||||
|
||||
m_imgActivityTips.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
ChangeBtnStyle();
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
//适配
|
||||
InitGridContent();
|
||||
|
||||
m_centerOnChild.Init(m_scrollView, m_checkThesHold);
|
||||
m_centerOnChild.SetElasticity(0.1f);
|
||||
|
||||
//设置拖拽回调函数
|
||||
m_centerOnChild.SetOnDragCallBack(OnDrag);
|
||||
m_centerOnChild.SetCallback(OnEndDrag);
|
||||
m_centerOnChild.SetEndCallBack(OnEndMovingDrag);
|
||||
CheckHomeOpen();
|
||||
|
||||
//设置按钮的状态
|
||||
// ShowBtnState();
|
||||
|
||||
//设置按钮图标的初始状态
|
||||
// SetBtnImgScale();
|
||||
|
||||
bool showGm = false;
|
||||
// #if UNITY_EDITOR
|
||||
// showGm = true;
|
||||
// #endif
|
||||
|
||||
m_btnGm.gameObject.SetActive(showGm);
|
||||
}
|
||||
|
||||
private void CheckHomeOpen()
|
||||
{
|
||||
GameMainButton curSelectType = GameMainButton.BtnFight;
|
||||
if (m_curIndex >= 0 && m_curIndex < m_listHomeChilds.Count)
|
||||
{
|
||||
curSelectType = m_listHomeChilds[m_curIndex].type;
|
||||
}
|
||||
|
||||
bool chg = false;
|
||||
|
||||
//商城
|
||||
if (!m_dictHomeChilds.ContainsKey(GameMainButton.BtnShop))
|
||||
{
|
||||
var child = CreateWidgetByType<ShopPage>(m_rectContent);
|
||||
child.type = GameMainButton.BtnShop;
|
||||
m_dictHomeChilds.Add(GameMainButton.BtnShop, child);
|
||||
m_listHomeChilds.Add(child);
|
||||
chg = true;
|
||||
}
|
||||
|
||||
//英雄
|
||||
if (!m_dictHomeChilds.ContainsKey(GameMainButton.BtnHero))
|
||||
{
|
||||
var child = CreateWidgetByType<HeroPage>(m_rectContent);
|
||||
child.type = GameMainButton.BtnHero;
|
||||
m_dictHomeChilds.Add(GameMainButton.BtnHero, child);
|
||||
m_listHomeChilds.Add(child);
|
||||
chg = true;
|
||||
}
|
||||
|
||||
//战斗
|
||||
if (!m_dictHomeChilds.ContainsKey(GameMainButton.BtnFight))
|
||||
{
|
||||
var child = CreateWidgetByType<MainLevelPage>(m_rectContent);
|
||||
child.type = GameMainButton.BtnFight;
|
||||
m_dictHomeChilds.Add(GameMainButton.BtnFight, child);
|
||||
m_listHomeChilds.Add(child);
|
||||
chg = true;
|
||||
}
|
||||
|
||||
//主角
|
||||
if (!m_dictHomeChilds.ContainsKey(GameMainButton.BtnZhuJue))
|
||||
{
|
||||
var child = CreateWidgetByType<ZhuJuePage>(m_rectContent);
|
||||
child.type = GameMainButton.BtnZhuJue;
|
||||
m_dictHomeChilds.Add(GameMainButton.BtnZhuJue, child);
|
||||
m_listHomeChilds.Add(child);
|
||||
chg = true;
|
||||
}
|
||||
|
||||
//活动(玩法)
|
||||
if (!m_dictHomeChilds.ContainsKey(GameMainButton.BtnActivity))
|
||||
{
|
||||
var child = CreateWidgetByType<ChallengePage>(m_rectContent);
|
||||
child.type = GameMainButton.BtnActivity;
|
||||
m_dictHomeChilds.Add(GameMainButton.BtnActivity, child);
|
||||
m_listHomeChilds.Add(child);
|
||||
chg = true;
|
||||
}
|
||||
|
||||
|
||||
if (chg)
|
||||
{
|
||||
m_listHomeChilds.Sort(delegate(HomeChildPage lhs, HomeChildPage rhs) { return lhs.type - rhs.type; });
|
||||
for (int i = 0; i < m_listHomeChilds.Count; i++)
|
||||
{
|
||||
m_listHomeChilds[i].Index = i;
|
||||
m_listHomeChilds[i].rectTransform.SetSiblingIndex(i);
|
||||
m_listHomeChilds[i].OnActivePage(m_listHomeChilds[i].type == curSelectType);
|
||||
}
|
||||
|
||||
int idx = GetGameMainIdx(curSelectType);
|
||||
m_curIndex = idx;
|
||||
m_lastIndex = idx;
|
||||
|
||||
//默认显示进入游戏界面
|
||||
m_centerOnChild.CenterOnChild(m_curIndex, true);
|
||||
}
|
||||
}
|
||||
|
||||
void InitGridContent()
|
||||
{
|
||||
var thisRect = this.rectTransform;
|
||||
m_tempV2.x = m_rectInfo.rect.width;
|
||||
m_tempV2.y = m_rectInfo.rect.height;
|
||||
m_gridContent.cellSize = m_tempV2;
|
||||
m_gridContent.SetLayoutHorizontal();
|
||||
m_gridContent.SetLayoutVertical();
|
||||
|
||||
var rectbtns = m_rectbtns.transform as RectTransform;
|
||||
m_cellSize = rectbtns.rect.width / (int)GameMainButton.BtnMax;
|
||||
m_rectbtns.constraint = GridLayoutGroup.Constraint.FixedColumnCount;
|
||||
m_rectbtns.constraintCount = (int)GameMainButton.BtnMax;
|
||||
m_rectbtns.cellSize = new Vector2(m_cellSize, m_rectbtns.cellSize.y);
|
||||
m_rectbtns.SetLayoutHorizontal();
|
||||
m_rectbtns.SetLayoutVertical();
|
||||
var Checkrect = m_imgCheck.transform as RectTransform;
|
||||
Checkrect.sizeDelta = new Vector2(m_cellSize + 30f, Checkrect.rect.height);
|
||||
}
|
||||
|
||||
|
||||
private void ChangeBtnStyle()
|
||||
{
|
||||
// int[] systemIds = new[]
|
||||
// {
|
||||
// (int)FuncType.FUNC_TYPE_MAIN_SHOP,
|
||||
// (int)FuncType.FUNC_TYPE_HERO,
|
||||
// (int)FuncType.FUNC_TYPE_FIGHT,
|
||||
// (int)FuncType.FUNC_TYPE_ZHUJUE,
|
||||
// (int)FuncType.FUNC_TYPE_MAIN_ACTIVITY,
|
||||
// };
|
||||
|
||||
GameMainButton[] types = new[]
|
||||
{
|
||||
//商店
|
||||
GameMainButton.BtnShop,
|
||||
//卡牌
|
||||
GameMainButton.BtnHero,
|
||||
//主界面
|
||||
GameMainButton.BtnFight,
|
||||
//主角
|
||||
GameMainButton.BtnZhuJue,
|
||||
//挑战(玩法)
|
||||
GameMainButton.BtnActivity,
|
||||
};
|
||||
// FuncOpenConfig cfg;
|
||||
// Image img;
|
||||
// TextMeshProUGUI txt;
|
||||
// GameMainButton key;
|
||||
// int id;
|
||||
// var actTxt = GetActiveTextNameByType(key);
|
||||
// for (int i = 0; i < types.Length; i++)
|
||||
// {
|
||||
// id = systemIds[i];
|
||||
// key = types[i];
|
||||
// cfg = FuncOpenCfgMgr.Instance.GetFuncOpenCfg((uint)id);
|
||||
// if (cfg == null)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// img = GetIconImageByType(key);
|
||||
// if (img != null)
|
||||
// {
|
||||
// img.SetSprite( cfg.FuncIcon);
|
||||
// }
|
||||
//
|
||||
// txt = GetTextNameByType(key);
|
||||
// if (txt != null)
|
||||
// {
|
||||
// txt.text = cfg.FuncName;
|
||||
// }
|
||||
//
|
||||
// if (actTxt != null)
|
||||
// {
|
||||
// actTxt.text = cfg.FuncName;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
#region 通用获取界面接口
|
||||
|
||||
//根据按钮类型获取对应按钮的gameObject
|
||||
private GameObject GetBtnGoByType(GameMainButton buttonType)
|
||||
{
|
||||
return m_btnDic.TryGetValue(buttonType, out var targetGo) ? targetGo : null;
|
||||
}
|
||||
|
||||
//根据按钮类型获取对应Icon
|
||||
private Image GetIconImageByType(GameMainButton buttonType)
|
||||
{
|
||||
return m_btnImgDic.TryGetValue(buttonType, out var targetImage) ? targetImage : null;
|
||||
}
|
||||
|
||||
//根据按钮类型获取对应text
|
||||
private TextMeshProUGUI GetTextNameByType(GameMainButton buttonType)
|
||||
{
|
||||
return m_btnTextDic.TryGetValue(buttonType, out var targetText) ? targetText : null;
|
||||
}
|
||||
|
||||
//根据按钮类型获取对应text
|
||||
private TextMeshProUGUI GetActiveTextNameByType(GameMainButton buttonType)
|
||||
{
|
||||
return m_btnActiveTextDic.TryGetValue(buttonType, out var targetText) ? targetText : null;
|
||||
}
|
||||
|
||||
//获取按钮解锁状态
|
||||
private bool GetBtnLockStateByType(GameMainButton buttonType)
|
||||
{
|
||||
// switch (buttonType)
|
||||
// {
|
||||
// case GameMainButton.BtnHero:
|
||||
// return FuncOpenMgr.Instance.CheckFuncOpen(FuncType.FUNC_TYPE_HERO);
|
||||
// case GameMainButton.BtnShop:
|
||||
// return FuncOpenMgr.Instance.CheckFuncOpen(FuncType.FUNC_TYPE_MAIN_SHOP);
|
||||
// case GameMainButton.BtnFight:
|
||||
// return FuncOpenMgr.Instance.CheckFuncOpen(FuncType.FUNC_TYPE_FIGHT);
|
||||
// case GameMainButton.BtnActivity:
|
||||
// return FuncOpenMgr.Instance.CheckFuncOpen(FuncType.FUNC_TYPE_MAIN_ACTIVITY);
|
||||
// case GameMainButton.BtnZhuJue:
|
||||
// return FuncOpenMgr.Instance.CheckFuncOpen(FuncType.FUNC_TYPE_ZHUJUE);
|
||||
// }
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public HomeChildPage GetChildPage(GameMainButton btnType)
|
||||
{
|
||||
if (m_dictHomeChilds.TryGetValue(btnType, out var ret))
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private int GetGameMainIdx(GameMainButton btnType)
|
||||
{
|
||||
var child = GetChildPage(btnType);
|
||||
if (child != null)
|
||||
{
|
||||
return child.Index;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public bool IsOnMainLevelPage()
|
||||
{
|
||||
bool isBtnFight = m_curIndex != GetGameMainIdx(GameMainButton.BtnFight);
|
||||
OnClickFightBtn();
|
||||
return isBtnFight;
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
m_centerOnChild.Update();
|
||||
}
|
||||
|
||||
//商店
|
||||
private void OnClickShopBtn()
|
||||
{
|
||||
int idx = GetGameMainIdx(GameMainButton.BtnShop);
|
||||
if (m_curIndex != idx)
|
||||
{
|
||||
m_centerOnChild.CenterOnChild(idx, false);
|
||||
}
|
||||
}
|
||||
|
||||
//英雄
|
||||
private void OnClickHeroBtn()
|
||||
{
|
||||
int idx = GetGameMainIdx(GameMainButton.BtnHero);
|
||||
if (m_curIndex != idx)
|
||||
{
|
||||
m_centerOnChild.CenterOnChild(idx, false);
|
||||
}
|
||||
|
||||
// 调到英雄界面的时候,重新刷一遍出战英雄特效
|
||||
// GameEvent.Get<IHeroUI>().OnFightHeroEffectRefresh();
|
||||
}
|
||||
|
||||
//战斗(主界面)
|
||||
private void OnClickFightBtn()
|
||||
{
|
||||
int idx = GetGameMainIdx(GameMainButton.BtnFight);
|
||||
if (m_curIndex != idx)
|
||||
{
|
||||
m_centerOnChild.CenterOnChild(idx, false);
|
||||
}
|
||||
}
|
||||
|
||||
//活动(玩法)
|
||||
private void OnClickActivityBtn()
|
||||
{
|
||||
if (m_imgActivityTips != null)
|
||||
{
|
||||
m_imgActivityTips.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
int idx = GetGameMainIdx(GameMainButton.BtnActivity);
|
||||
if (m_curIndex != idx)
|
||||
{
|
||||
m_centerOnChild.CenterOnChild(idx, false);
|
||||
}
|
||||
}
|
||||
|
||||
//点击天赋
|
||||
private void OnClickZhuJueBtn()
|
||||
{
|
||||
int idx = GetGameMainIdx(GameMainButton.BtnZhuJue);
|
||||
if (m_curIndex != idx)
|
||||
{
|
||||
m_centerOnChild.CenterOnChild(idx, false);
|
||||
}
|
||||
}
|
||||
|
||||
#region 拖拽事件
|
||||
|
||||
private float _lastX = 0f;
|
||||
|
||||
private const float DynamicsX = 0.3f;
|
||||
|
||||
//拖拽中
|
||||
private void OnDrag(int curDragIndex)
|
||||
{
|
||||
if (curDragIndex >= m_listHomeChilds.Count)
|
||||
{
|
||||
Log.Error("DragIndex Error : OnDrag exceed Count / curDragIndex:{0} ,m_listHomeChilds.Count{1}", curDragIndex, m_listHomeChilds.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
var btnType = m_listHomeChilds[curDragIndex].type;
|
||||
float offset = m_rectContent.anchoredPosition.x + curDragIndex * m_tempV2.x;
|
||||
float x = m_cellSize * (int)btnType - (offset / m_cellSize) * m_cellSize;
|
||||
|
||||
if (_lastX != 0)
|
||||
{
|
||||
//var Gap = (x - m_LastX)* (m_dynamicsX - (int)GameMainButton.BtnMax / 10);
|
||||
var Gap = (x - _lastX) * DynamicsX;
|
||||
var index = curDragIndex;
|
||||
if (Gap > 0)
|
||||
{
|
||||
index = Mathf.Min(++curDragIndex, (int)GameMainButton.BtnZhuJue);
|
||||
}
|
||||
else
|
||||
{
|
||||
index = Mathf.Max(--curDragIndex, (int)GameMainButton.BtnShop);
|
||||
}
|
||||
|
||||
if (m_listHomeChilds.Count <= index)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_listHomeChilds[index].OnActivePage(true);
|
||||
m_imgCheck.transform.localPosition = new Vector2(m_imgCheck.transform.localPosition.x + Gap, m_imgCheck.transform.localPosition.y);
|
||||
}
|
||||
|
||||
_lastX = x;
|
||||
}
|
||||
|
||||
private void OnEndMovingDrag(int curDragIndex)
|
||||
{
|
||||
var btnType = m_listHomeChilds[curDragIndex].type;
|
||||
GameObject btnGo = GetBtnGoByType(btnType);
|
||||
LeanTweenType tweenType = LeanTweenType.easeOutBack;
|
||||
if (curDragIndex == m_lastIndex)
|
||||
{
|
||||
tweenType = LeanTweenType.notUsed;
|
||||
}
|
||||
|
||||
if (_lastX != 0 || curDragIndex != m_lastIndex)
|
||||
{
|
||||
LeanTween.moveX(m_imgCheck.gameObject, btnGo.transform.position.x, m_aniTime + 0.1f).setEase(tweenType).setOnComplete(
|
||||
() =>
|
||||
{
|
||||
for (int i = 0; i < m_listHomeChilds.Count; i++)
|
||||
{
|
||||
m_listHomeChilds[i].OnActivePage(i == curDragIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_lastX = 0f;
|
||||
|
||||
// if (curDragIndex == (int)GameMainButton.BtnZhuJue)
|
||||
// {
|
||||
// GameEvent.Get<ICommUI>().SetMainPageDisplayBlock(
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_TALENT,
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_GOLD,
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_DIAMOND);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GameEvent.Get<ICommUI>().SetMainPageDisplayBlock(
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_POWER,
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_GOLD,
|
||||
// TopDisplayItemType.TOP_DIS_ITEM_TYPE_DIAMOND);
|
||||
// }
|
||||
|
||||
// //播放下音效
|
||||
// if (!m_isInitEnter)
|
||||
// {
|
||||
// AudioSys.GameMgr.PlayUISoundEffect(SysEffectSoundID.SysSoundHuaDongYinXiao);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// m_isInitEnter = false;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
//拖拽结束,计算各个按钮的位置
|
||||
private void OnEndDrag(int curDragIndex)
|
||||
{
|
||||
if (curDragIndex >= m_listHomeChilds.Count)
|
||||
{
|
||||
Log.Error("DragIndex Error : OnEndDrag exceed Count / curDragIndex:{0} ,m_listHomeChilds.Count{1}", curDragIndex, m_listHomeChilds.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
m_lastIndex = m_curIndex;
|
||||
m_curIndex = curDragIndex;
|
||||
|
||||
#region 回调下page界面
|
||||
|
||||
for (int i = 0; i < m_listHomeChilds.Count; i++)
|
||||
{
|
||||
m_listHomeChilds[i].OnCenterOn(i == m_curIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
bool isLeftToRight = m_curIndex >= m_lastIndex;
|
||||
var btnType = m_listHomeChilds[m_curIndex].type;
|
||||
var oldBtnType = m_listHomeChilds[m_lastIndex].type;
|
||||
m_listHomeChilds[m_curIndex].OnActivePage(true);
|
||||
// m_homeChat.gameObject.SetActive(btnType == GameMainButton.BtnFight);
|
||||
|
||||
Image curImg = GetIconImageByType(btnType);
|
||||
GameObject imgGo = curImg.gameObject;
|
||||
|
||||
if (isLeftToRight)
|
||||
{
|
||||
for (var i = oldBtnType; i < btnType; i++)
|
||||
{
|
||||
Image lastImg = GetIconImageByType(i);
|
||||
GameObject lastImgGo = lastImg.gameObject;
|
||||
|
||||
//LeanTween.moveLocal(lastImgGo, new Vector2(imgGo.transform.localPosition.x, 0), m_aniTime);
|
||||
if (GetBtnLockStateByType(i))
|
||||
{
|
||||
LeanTween.scale(lastImgGo, new Vector3(m_lastScaleRatio, m_lastScaleRatio, m_lastScaleRatio), m_aniTime);
|
||||
GetTextNameByType(i).gameObject.SetActive(true);
|
||||
GetActiveTextNameByType(i).gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
lastImg.color = new Color(255, 255, 255, 204);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i = oldBtnType; i > btnType; i--)
|
||||
{
|
||||
Image lastImg = GetIconImageByType(i);
|
||||
GameObject lastImgGo = lastImg.gameObject;
|
||||
|
||||
//LeanTween.moveLocal(lastImgGo, new Vector2(imgGo.transform.localPosition.x, 0), m_aniTime);
|
||||
if (GetBtnLockStateByType(i))
|
||||
{
|
||||
LeanTween.scale(lastImgGo, new Vector3(m_lastScaleRatio, m_lastScaleRatio, m_lastScaleRatio), m_aniTime);
|
||||
|
||||
GetTextNameByType(i).gameObject.SetActive(true);
|
||||
GetActiveTextNameByType(i).gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
lastImg.color = new Color(255, 255, 255, 204);
|
||||
}
|
||||
}
|
||||
|
||||
//LeanTween.moveLocal(imgGo, new Vector2(imgGo.transform.localPosition.x, 30f), m_aniTime);
|
||||
LeanTween.scale(imgGo, new Vector3(m_curScaleRatio, m_curScaleRatio, m_curScaleRatio), m_aniTime).setOnComplete(
|
||||
() =>
|
||||
{
|
||||
#region 回调下page界面
|
||||
|
||||
for (int i = 0; i < m_listHomeChilds.Count; i++)
|
||||
{
|
||||
m_listHomeChilds[i].OnCenterOnEnd(i == m_curIndex);
|
||||
}
|
||||
|
||||
#endregion
|
||||
});
|
||||
curImg.color = new Color(255, 255, 255, 255);
|
||||
GetTextNameByType(btnType).gameObject.SetActive(false);
|
||||
GetActiveTextNameByType(btnType).gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcc7533a040c48ecbc082567c2cef691
|
||||
timeCreated: 1695711322
|
@@ -1,61 +0,0 @@
|
||||
using TEngine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
/// <summary>
|
||||
/// 首页子界面。
|
||||
/// </summary>
|
||||
public class HomeChildPage : UIWidget
|
||||
{
|
||||
public GameMainButton type;
|
||||
|
||||
public int Index;
|
||||
|
||||
private CanvasGroup _canvasGroup;
|
||||
|
||||
/// <summary>
|
||||
/// 检查红点。
|
||||
/// </summary>
|
||||
/// <returns>红点状态。</returns>
|
||||
public virtual bool CheckRedNote()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 拖拽完成开始。
|
||||
/// </summary>
|
||||
/// <param name="isSelf"></param>
|
||||
public virtual void OnCenterOn(bool isSelf) { }
|
||||
|
||||
/// <summary>
|
||||
/// 拖拽完成回调。
|
||||
/// </summary>
|
||||
/// <param name="isSelf"></param>
|
||||
public virtual void OnCenterOnEnd(bool isSelf) { }
|
||||
|
||||
/// <summary>
|
||||
/// 激活界面回调。
|
||||
/// </summary>
|
||||
/// <param name="isActive">是否激活。</param>
|
||||
public virtual void OnActivePage(bool isActive)
|
||||
{
|
||||
SetAlpha(isActive ? 1 : 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过设置Alpha隐藏,减少SetActive的消耗。
|
||||
/// </summary>
|
||||
/// <param name="alpha">Alpha值。</param>
|
||||
protected void SetAlpha(float alpha)
|
||||
{
|
||||
if (_canvasGroup == null)
|
||||
{
|
||||
_canvasGroup = gameObject.GetOrAddComponent<CanvasGroup>();
|
||||
}
|
||||
|
||||
_canvasGroup.alpha = alpha;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0488dff8374745c5b8250103e7136849
|
||||
timeCreated: 1695714988
|
@@ -1,27 +0,0 @@
|
||||
namespace GameLogic
|
||||
{
|
||||
public class ShopPage:HomeChildPage
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class MainLevelPage:HomeChildPage
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class ZhuJuePage:HomeChildPage
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class HeroPage:HomeChildPage
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class ChallengePage:HomeChildPage
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4aabbaba0f0a4f4c96f5b50e38cd7690
|
||||
timeCreated: 1695716304
|
@@ -1,316 +0,0 @@
|
||||
using System;
|
||||
#if ENABLE_CANTMOVE
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
using TEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public class UICenterOnChild
|
||||
{
|
||||
private float _elasticity = 0.1f;
|
||||
private ScrollRect _scrollRect;
|
||||
private RectTransform _content;
|
||||
private EventTrigger _eventTrigger;
|
||||
private Action<int> _callback;
|
||||
private Action<int> _onEndCallback;
|
||||
private Action<int> _onDragCallback;
|
||||
private Action<int> _onEndMovingCallback;
|
||||
|
||||
private int _targetIdx;
|
||||
private bool _isMoving = false;
|
||||
private Vector2 _velocity = Vector2.zero;
|
||||
private readonly Vector3[] _cornersArray = new Vector3[4];
|
||||
|
||||
//用阈值处理翻页,调整背包拖动问题
|
||||
private float _checkThresholdX = 0f;
|
||||
private float _startX;
|
||||
|
||||
#if ENABLE_CANTMOVE
|
||||
//不能作为目标id的id列表
|
||||
private List<int> _canNotMoveIdxs = new List<int>();
|
||||
#endif
|
||||
|
||||
public void Init(ScrollRect scrollRect, float checkThreshold = 0f)
|
||||
{
|
||||
_scrollRect = scrollRect;
|
||||
_scrollRect.movementType = ScrollRect.MovementType.Unrestricted;
|
||||
_scrollRect.inertia = false;
|
||||
_content = _scrollRect.content;
|
||||
_checkThresholdX = checkThreshold;
|
||||
|
||||
_eventTrigger = _scrollRect.GetComponent<EventTrigger>();
|
||||
if (_eventTrigger == null)
|
||||
{
|
||||
_eventTrigger = _scrollRect.gameObject.AddComponent<EventTrigger>();
|
||||
}
|
||||
|
||||
EventTrigger.Entry dragEntry = new EventTrigger.Entry();
|
||||
dragEntry.eventID = EventTriggerType.Drag;
|
||||
dragEntry.callback.AddListener(OnDrag);
|
||||
_eventTrigger.triggers.Add(dragEntry);
|
||||
EventTrigger.Entry endDragEntry = new EventTrigger.Entry();
|
||||
endDragEntry.eventID = EventTriggerType.EndDrag;
|
||||
endDragEntry.callback.AddListener(OnEndDrag);
|
||||
_eventTrigger.triggers.Add(endDragEntry);
|
||||
EventTrigger.Entry startDragEntry = new EventTrigger.Entry();
|
||||
startDragEntry.eventID = EventTriggerType.BeginDrag;
|
||||
startDragEntry.callback.AddListener(OnStartDrag);
|
||||
_eventTrigger.triggers.Add(startDragEntry);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (_isMoving)
|
||||
{
|
||||
if (0 <= _targetIdx && _targetIdx < _content.childCount)
|
||||
{
|
||||
Vector2 center = GetCenter(_scrollRect.viewport);
|
||||
Vector2 pos = GetCenter(_content.GetChild(_targetIdx) as RectTransform);
|
||||
Vector2 offset = pos - center;
|
||||
_content.anchoredPosition = Vector2.SmoothDamp(
|
||||
_content.anchoredPosition,
|
||||
_content.anchoredPosition - offset,
|
||||
ref _velocity,
|
||||
_elasticity,
|
||||
float.MaxValue,
|
||||
GameTime.deltaTime);
|
||||
if (_velocity.magnitude < 1)
|
||||
{
|
||||
if (_onEndMovingCallback != null)
|
||||
{
|
||||
_onEndMovingCallback(_targetIdx);
|
||||
}
|
||||
_isMoving = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_onEndMovingCallback != null)
|
||||
{
|
||||
_onEndMovingCallback(_targetIdx);
|
||||
}
|
||||
|
||||
_isMoving = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetOnDragCallBack(Action<int> callback)
|
||||
{
|
||||
_onDragCallback = callback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置回调,返回当前居中的 childIndex
|
||||
/// </summary>
|
||||
public void SetCallback(Action<int> callback)
|
||||
{
|
||||
_callback = callback;
|
||||
}
|
||||
|
||||
public void SetEndCallBack(Action<int> endCallback)
|
||||
{
|
||||
_onEndCallback = endCallback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置停止移动时回调
|
||||
/// </summary>
|
||||
/// <param name="callBack"></param>
|
||||
public void SetOnEndMovingCallback(Action<int> callBack)
|
||||
{
|
||||
_onEndMovingCallback = callBack;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置弹力,默认为0.1
|
||||
/// </summary>
|
||||
public void SetElasticity(float elasticity)
|
||||
{
|
||||
_elasticity = elasticity;
|
||||
}
|
||||
|
||||
//设置不能移动的索引
|
||||
public void SetCanNotMoveId(int id)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
if (!_canNotMoveIdxs.Contains(id))
|
||||
{
|
||||
_canNotMoveIdxs.Add(id);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//移除不能移动的索引
|
||||
public void RemoveCanNotMoveId(int id)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
if (_canNotMoveIdxs.Contains(id))
|
||||
{
|
||||
_canNotMoveIdxs.Remove(id);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 居中到 childIndex
|
||||
/// </summary>
|
||||
public void CenterOnChild(int childIndex, bool isImmediately = true)
|
||||
{
|
||||
if (0 <= childIndex && childIndex < _content.childCount)
|
||||
{
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(_content);
|
||||
_targetIdx = childIndex;
|
||||
if (isImmediately)
|
||||
{
|
||||
Vector2 center = GetCenter(_scrollRect.viewport);
|
||||
Vector2 pos = GetCenter(_content.GetChild(_targetIdx) as RectTransform);
|
||||
Vector2 offset = pos - center;
|
||||
_content.anchoredPosition = _content.anchoredPosition - offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
_isMoving = true;
|
||||
}
|
||||
|
||||
if (_callback != null)
|
||||
{
|
||||
_callback(_targetIdx);
|
||||
}
|
||||
|
||||
if (_onEndCallback != null)
|
||||
{
|
||||
_onEndCallback(_targetIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnStartDrag(BaseEventData param)
|
||||
{
|
||||
_startX = _content.anchoredPosition.x;
|
||||
}
|
||||
|
||||
private void OnDrag(BaseEventData param)
|
||||
{
|
||||
_isMoving = false;
|
||||
if (_onDragCallback != null)
|
||||
{
|
||||
_onDragCallback(_targetIdx);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEndDrag(BaseEventData param)
|
||||
{
|
||||
if (_checkThresholdX == 0f)
|
||||
{
|
||||
FindClosest();
|
||||
}
|
||||
else
|
||||
{
|
||||
var moved = _content.anchoredPosition.x - _startX;
|
||||
|
||||
int newIdx = _targetIdx;
|
||||
if (moved > _checkThresholdX)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
newIdx = Math.Max(0, m_targetIdx - 1);
|
||||
#endif
|
||||
for (int i = 0; i < _targetIdx; i++)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
//新id不能是m_canNotBeTargetIdx
|
||||
if (_canNotMoveIdxs.Contains(i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
newIdx = i;
|
||||
}
|
||||
}
|
||||
else if (moved < -_checkThresholdX)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
//newIdx = Math.Min(m_content.childCount - 1, m_targetIdx + 1);
|
||||
#endif
|
||||
for (int i = _content.childCount - 1; i >= _targetIdx + 1; i--)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
if (_canNotMoveIdxs.Contains(i))
|
||||
{
|
||||
continue;
|
||||
|
||||
}
|
||||
#endif
|
||||
newIdx = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (_targetIdx != newIdx)
|
||||
{
|
||||
_targetIdx = newIdx;
|
||||
if (_callback != null)
|
||||
{
|
||||
_callback(_targetIdx);
|
||||
}
|
||||
}
|
||||
|
||||
if (_onEndCallback != null)
|
||||
{
|
||||
_onEndCallback(_targetIdx);
|
||||
}
|
||||
|
||||
_isMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void FindClosest()
|
||||
{
|
||||
if (_content.childCount > 0)
|
||||
{
|
||||
Vector2 center = GetCenter(_scrollRect.viewport);
|
||||
float minDist = float.MaxValue;
|
||||
for (int i = 0; i < _content.childCount; i++)
|
||||
{
|
||||
#if ENABLE_CANTMOVE
|
||||
if (_canNotMoveIdxs.Contains(i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
Vector2 pos = GetCenter(_content.GetChild(i) as RectTransform);
|
||||
Vector2 offset = pos - center;
|
||||
float sqrDist = Vector2.SqrMagnitude(offset);
|
||||
if (sqrDist < minDist)
|
||||
{
|
||||
minDist = sqrDist;
|
||||
_targetIdx = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (_callback != null)
|
||||
{
|
||||
_callback(_targetIdx);
|
||||
}
|
||||
|
||||
_isMoving = true;
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 GetCenter(RectTransform rectTransform)
|
||||
{
|
||||
Vector3 offset = _scrollRect.viewport.InverseTransformPoint(rectTransform.position);
|
||||
rectTransform.GetLocalCorners(_cornersArray);
|
||||
offset = offset + (_cornersArray[0] + _cornersArray[2]) * 0.5f;
|
||||
return offset;
|
||||
}
|
||||
|
||||
public bool GetIsMoving()
|
||||
{
|
||||
return _isMoving;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57ed983ab97840a3958e3b375acdaf98
|
||||
timeCreated: 1695714913
|
@@ -405,6 +405,7 @@ Transform:
|
||||
- {fileID: 1666908677}
|
||||
- {fileID: 1863338241}
|
||||
- {fileID: 914171638}
|
||||
- {fileID: 1047779124}
|
||||
m_Father: {fileID: 1195690679}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -767,6 +768,50 @@ MonoBehaviour:
|
||||
milliseconds: 30
|
||||
downloadingMaxNum: 3
|
||||
failedTryAgain: 3
|
||||
--- !u!1 &1047779123
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1047779124}
|
||||
- component: {fileID: 1047779125}
|
||||
m_Layer: 0
|
||||
m_Name: DisStripCode
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1047779124
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1047779123}
|
||||
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: 709048975}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1047779125
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1047779123}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cfc34c9132d650b499fc6f146e1e11f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1174611474
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.code-philosophy.hybridclr": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
|
||||
"com.cysharp.memorypack": "https://github.com/Cysharp/MemoryPack.git?path=src/MemoryPack.Unity/Assets/Plugins/MemoryPack",
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.2d.tilemap": "1.0.0",
|
||||
"com.unity.ide.rider": "3.0.24",
|
||||
@@ -9,6 +8,7 @@
|
||||
"com.unity.nuget.newtonsoft-json": "3.0.2",
|
||||
"com.unity.render-pipelines.universal": "12.1.10",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.6",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.ai": "1.0.0",
|
||||
"com.unity.modules.androidjni": "1.0.0",
|
||||
|
@@ -7,13 +7,6 @@
|
||||
"dependencies": {},
|
||||
"hash": "b024a18ba16cccb7ac3c72cf3ce272ef025eb5e4"
|
||||
},
|
||||
"com.cysharp.memorypack": {
|
||||
"version": "https://github.com/Cysharp/MemoryPack.git?path=src/MemoryPack.Unity/Assets/Plugins/MemoryPack",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "09eb5f1535d0d01dee98c84fa110c21a436bd896"
|
||||
},
|
||||
"com.cysharp.unitask": {
|
||||
"version": "file:UniTask",
|
||||
"depth": 0,
|
||||
@@ -171,6 +164,16 @@
|
||||
},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.toolchain.win-x86_64-linux-x86_64": {
|
||||
"version": "2.0.6",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.sysroot": "2.0.7",
|
||||
"com.unity.sysroot.linux-x86_64": "2.0.6"
|
||||
},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.ugui": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
|
Reference in New Issue
Block a user