龙腾猫跃 4 лет назад
Родитель
Сommit
bf30c1190f
31 измененных файлов с 98 добавлено и 2570 удалено
  1. 0 8
      Assets/Resources/Controls.meta
  2. 0 26
      Assets/Resources/Controls/ContentSizeMininum.cs
  3. 0 11
      Assets/Resources/Controls/ContentSizeMininum.cs.meta
  4. 0 8
      Assets/Resources/Controls/Form.meta
  5. 0 35
      Assets/Resources/Controls/Form/FormM.cs
  6. 0 11
      Assets/Resources/Controls/Form/FormM.cs.meta
  7. 0 35
      Assets/Resources/Controls/Form/MyForm.cs
  8. 0 393
      Assets/Resources/Controls/Form/MyForm.prefab
  9. 0 7
      Assets/Resources/Controls/Form/MyForm.prefab.meta
  10. 0 8
      Assets/Resources/Controls/TextPic.meta
  11. BIN
      Assets/Resources/Controls/TextPic/#coin.png
  12. 0 755
      Assets/Resources/Controls/TextPic/TextPic.cs
  13. 0 12
      Assets/Resources/Controls/TextPic/TextPic.cs.meta
  14. 0 8
      Assets/Resources/Controls/Tooltip.meta
  15. 0 98
      Assets/Resources/Controls/Tooltip/BasicTooltip.cs
  16. 0 11
      Assets/Resources/Controls/Tooltip/BasicTooltip.cs.meta
  17. 0 283
      Assets/Resources/Controls/Tooltip/BasicTooltipReceiver.cs
  18. 0 8
      Assets/Resources/Controls/Tooltip/BasicTooltipReceiver.cs.meta
  19. BIN
      Assets/Resources/Entities/Player.png
  20. BIN
      Assets/Resources/Entities/PlayerDown.png
  21. 13 1
      Assets/Resources/Entities/PlayerDown.png.meta
  22. BIN
      Assets/Resources/Entities/PlayerNormal.png
  23. 39 3
      Assets/Resources/Entities/PlayerNormal.png.meta
  24. 0 36
      Assets/Resources/System/InputM.cs
  25. 0 11
      Assets/Resources/System/InputM.cs.meta
  26. 0 18
      Assets/Resources/System/MainM.cs
  27. 0 11
      Assets/Resources/System/MainM.cs.meta
  28. 27 9
      Assets/Resources/System/PlayerController.cs
  29. 17 762
      Assets/Scenes/SceneMain.unity
  30. 1 1
      Assets/Scenes/Test.cs.meta
  31. 1 1
      ProjectSettings/Physics2DSettings.asset

+ 0 - 8
Assets/Resources/Controls.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f70ea6d62aa046d46b88a96005c8018c
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 26
Assets/Resources/Controls/ContentSizeMininum.cs

@@ -1,26 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-[RequireComponent(typeof(RectTransform)), ExecuteInEditMode]
-[AddComponentMenu("UI/Content Size Mininum")]
-public class ContentSizeMininum : MonoBehaviour {
-
-    [System.NonSerialized] private RectTransform m_Rect;
-    private RectTransform rectTransform {
-        get {
-            if (m_Rect == null) m_Rect = GetComponent<RectTransform>();
-            return m_Rect;
-        }
-    }
-
-    void Update() {
-        List<RectTransform> childTransforms = new(GetComponentsInChildren<RectTransform>());
-        if (childTransforms.Count == 1) return;
-        RectTransform childTransform = childTransforms[1];
-        Vector2 newSize = new(LayoutUtility.GetPreferredWidth(childTransform), LayoutUtility.GetPreferredHeight(childTransform));
-        if (rectTransform.sizeDelta != newSize) rectTransform.sizeDelta = newSize;
-    }
-
-}

+ 0 - 11
Assets/Resources/Controls/ContentSizeMininum.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c66b4ef354d074f499b3b35008b1252d
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Assets/Resources/Controls/Form.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3fdfb213d9d010f4195f7cef78b88c6f
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 35
Assets/Resources/Controls/Form/FormM.cs

@@ -1,35 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class FormM : MonoBehaviour {
-
-    // 初始化窗口列表
-    private static List<MyForm> formList = new();
-    private void Start() {
-        formList = new List<MyForm>(FindObjectsOfType<MyForm>());
-        Debug.Log("找到了 " + formList.Count + " 个窗口");
-        // 针对窗口的初始化状态,确保只有一个窗口正在显示中
-        foreach (MyForm form in formList) {
-            if (form.defaultShow) _currentForm = form;
-        }
-        foreach (MyForm form in formList) {
-            form.isShowing = (_currentForm != null && _currentForm.name == form.name);
-        }
-    }
-    
-    // 管理当前窗口
-    private static MyForm _currentForm = null;
-    public static MyForm currentForm {
-        get { return _currentForm; }
-        set {
-            if (value == _currentForm) return;
-            _currentForm = value;
-            // 激活或隐藏窗口
-            foreach (MyForm form in formList) {
-                form.isShowing = (value != null && value.name == form.name);
-            }
-        }
-    }
-
-}

+ 0 - 11
Assets/Resources/Controls/Form/FormM.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1eb22e3aad8a32841864e5c42b7e35dd
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 35
Assets/Resources/Controls/Form/MyForm.cs

@@ -1,35 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class MyForm : MonoBehaviour {
-    public KeyCode key = KeyCode.None;
-    public bool defaultShow = false;
-    private Vector2 originalPosition;
-    public void Awake() {
-        // 绑定显示按键(切换显示状态)
-        if (key != KeyCode.None) {
-            InputM.AddKeyboardEvent(key, () => SwapShowing());
-        }
-        // 保存初始位置
-        originalPosition = GetComponent<RectTransform>().anchoredPosition;
-    }
-
-    // 设置或更改窗口的显示状态
-    public void SwapShowing() {
-        FormM.currentForm = (FormM.currentForm == this ? null : this);
-    }
-    public bool isShowing {
-        get { return gameObject.activeSelf; }
-        set {
-            if (isShowing == value) return;
-            if (value) {
-                gameObject.SetActive(true);
-                GetComponent<RectTransform>().anchoredPosition = originalPosition; // 还原到初始位置
-            } else {
-                gameObject.SetActive(false);
-            }
-        }
-    }
-    
-}

+ 0 - 393
Assets/Resources/Controls/Form/MyForm.prefab

@@ -1,393 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!1 &436671130291213269
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 436671130291213270}
-  - component: {fileID: 436671130291213265}
-  - component: {fileID: 436671130291213264}
-  - component: {fileID: 720637362666162677}
-  m_Layer: 5
-  m_Name: RectTitle
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &436671130291213270
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130291213269}
-  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: 436671130609497331}
-  m_Father: {fileID: 436671130526693116}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 150, y: 40}
-  m_Pivot: {x: 0.5, y: 1}
---- !u!114 &436671130291213265
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130291213269}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: b318a1a750f19e94d81b3b977b127799, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  KeepWindowInCanvas: 20
-  RootTransform: {fileID: 436671130526693116}
---- !u!222 &436671130291213264
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130291213269}
-  m_CullTransparentMesh: 1
---- !u!114 &720637362666162677
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130291213269}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 24a41e057b5e84e48af58b4764cb95ab, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}
-  m_RaycastTarget: 1
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  shader: {fileID: 4800000, guid: 49bd69fe5eda21245870bc7ea5f2ad16, type: 3}
-  _cornerArea: 0.5
---- !u!1 &436671130526693107
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 436671130526693116}
-  - component: {fileID: 436671130526693118}
-  - component: {fileID: 436671130526693112}
-  - component: {fileID: 4459516936476437328}
-  - component: {fileID: 4976166116990924339}
-  - component: {fileID: 9027276016423363208}
-  m_Layer: 5
-  m_Name: MyForm
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &436671130526693116
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  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: 436671130291213270}
-  - {fileID: 8120329515836380142}
-  m_Father: {fileID: 0}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 300, y: 400}
-  m_Pivot: {x: 0, y: 0}
---- !u!222 &436671130526693118
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  m_CullTransparentMesh: 1
---- !u!114 &436671130526693112
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 26eac2ccae1eba54e812c1746a6d9b9d, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  key: 0
-  defaultShow: 0
---- !u!114 &4459516936476437328
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 24a41e057b5e84e48af58b4764cb95ab, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0.27450982, g: 0.27450982, b: 0.27450982, a: 0.8235294}
-  m_RaycastTarget: 1
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  shader: {fileID: 4800000, guid: 49bd69fe5eda21245870bc7ea5f2ad16, type: 3}
-  _cornerArea: 0.03
---- !u!114 &4976166116990924339
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Padding:
-    m_Left: 0
-    m_Right: 0
-    m_Top: -20
-    m_Bottom: 0
-  m_ChildAlignment: 1
-  m_Spacing: 0
-  m_ChildForceExpandWidth: 0
-  m_ChildForceExpandHeight: 0
-  m_ChildControlWidth: 0
-  m_ChildControlHeight: 0
-  m_ChildScaleWidth: 1
-  m_ChildScaleHeight: 1
-  m_ReverseArrangement: 0
---- !u!114 &9027276016423363208
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130526693107}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_HorizontalFit: 2
-  m_VerticalFit: 2
---- !u!1 &436671130609497330
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 436671130609497331}
-  - component: {fileID: 436671130609497341}
-  - component: {fileID: 436671130609497340}
-  m_Layer: 5
-  m_Name: LabTitle
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &436671130609497331
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130609497330}
-  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: 436671130291213270}
-  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 &436671130609497341
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130609497330}
-  m_CullTransparentMesh: 1
---- !u!114 &436671130609497340
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 436671130609497330}
-  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: 0
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_text: "\u7A97\u53E3\u6807\u9898"
-  m_isRightToLeft: 0
-  m_fontAsset: {fileID: 11400000, guid: 111f669b42bef2647b5b553aedbc9c96, type: 2}
-  m_sharedMaterial: {fileID: -5046000281169226730, guid: 111f669b42bef2647b5b553aedbc9c96, 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: 19
-  m_fontSizeBase: 19
-  m_fontWeight: 400
-  m_enableAutoSizing: 0
-  m_fontSizeMin: 18
-  m_fontSizeMax: 72
-  m_fontStyle: 0
-  m_HorizontalAlignment: 2
-  m_VerticalAlignment: 512
-  m_textAlignment: 65535
-  m_characterSpacing: 0
-  m_wordSpacing: 0
-  m_lineSpacing: 0
-  m_lineSpacingMax: 0
-  m_paragraphSpacing: 0
-  m_charWidthMaxAdj: 0
-  m_enableWordWrapping: 1
-  m_wordWrappingRatios: 0.4
-  m_overflowMode: 0
-  m_linkedTextComponent: {fileID: 0}
-  parentLinkedComponent: {fileID: 0}
-  m_enableKerning: 1
-  m_enableExtraPadding: 0
-  checkPaddingRequired: 0
-  m_isRichText: 0
-  m_parseCtrlCharacters: 1
-  m_isOrthographic: 1
-  m_isCullingEnabled: 0
-  m_horizontalMapping: 0
-  m_verticalMapping: 0
-  m_uvLineOffset: 0
-  m_geometrySortingOrder: 0
-  m_IsTextObjectScaleStatic: 0
-  m_VertexBufferAutoSizeReduction: 0
-  m_useMaxVisibleDescender: 1
-  m_pageToDisplay: 1
-  m_margin: {x: 0, y: 0, z: 0, w: 0}
-  m_isUsingLegacyAnimationComponent: 0
-  m_isVolumetricText: 0
-  m_hasFontAssetChanged: 0
-  m_baseMaterial: {fileID: 0}
-  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
---- !u!1 &9211068785161554706
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 8120329515836380142}
-  - component: {fileID: 529116591351030175}
-  m_Layer: 5
-  m_Name: Content
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &8120329515836380142
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9211068785161554706}
-  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: 436671130526693116}
-  m_RootOrder: 1
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 300, y: 150}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &529116591351030175
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9211068785161554706}
-  m_CullTransparentMesh: 1

+ 0 - 7
Assets/Resources/Controls/Form/MyForm.prefab.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: bdc67bfeca0bb6d449f029fb550d5d23
-PrefabImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Assets/Resources/Controls/TextPic.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: c989e52abb0f096498cb2e4f838a173f
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

BIN
Assets/Resources/Controls/TextPic/#coin.png


+ 0 - 755
Assets/Resources/Controls/TextPic/TextPic.cs

@@ -1,755 +0,0 @@
-/// Credit drobina, w34edrtfg, playemgames 
-/// Sourced from - http://forum.unity3d.com/threads/sprite-icons-with-text-e-g-emoticons.265927/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Text.RegularExpressions;
-using UnityEngine;
-using UnityEngine.Events;
-using UnityEngine.EventSystems;
-using UnityEngine.UI;
-
-[AddComponentMenu("UI/Extensions/TextPic")]
-public class TextPic : Text, IPointerClickHandler, IPointerExitHandler, IPointerEnterHandler, ISelectHandler {
-
-	// 解决换行空格问题
-	private string _rawText = "";
-	public string rawText {
-		get { return _rawText; }
-	}
-	public override string text {
-		get {
-			return m_Text;
-		}
-		set {
-			if (string.IsNullOrEmpty(value)) {
-				if (!string.IsNullOrEmpty(m_Text)) {
-					m_Text = "";
-					_rawText = "";
-					SetVerticesDirty();
-				}
-			} else if (m_Text != value.Replace(" ", "¨")) {
-				m_Text = value.Replace(" ", "¨");
-				_rawText = value;
-				SetVerticesDirty();
-				SetLayoutDirty();
-			}
-		}
-	}
-
-    // Icon entry to replace text with
-    [Serializable]
-	public struct IconName {
-		public string name;
-		public Sprite sprite;
-		public Vector2 offset;
-		public Vector2 scale;
-	}
-
-	// Icons and text to replace
-	private static List<IconName> _iconList;
-	private static List<IconName> iconList {
-		get {
-			if (_iconList == null) {
-				_iconList = new List<IconName>();
-				foreach (Sprite sprite in Resources.LoadAll<Sprite>("Controls/TextPic")) {
-					_iconList.Add(new IconName { name = sprite.name, sprite = sprite, offset = Vector2.zero, scale = Vector2.one });
-				}
-				Debug.Log("加载了 " + _iconList.Count + " 个 TextPic 图标");
-			}
-			return _iconList;
-		}
-	}
-	public static void ResetIconList() {
-		_iconList = null;
-    }
-
-	[Tooltip("Global scaling factor for all images")]
-	public float ImageScalingFactor = 1.05f;
-
-	// Write the name or hex value of the hyperlink color
-	public string hyperlinkColor = "blue";
-
-	// Offset image by x, y
-	public Vector2 imageOffset = new(0, -2.5f);
-	public bool isCreating_m_HrefInfos = true;
-
-	[Serializable]
-	public class HrefClickEvent : UnityEvent<string> { }
-
-	[SerializeField]
-	private HrefClickEvent m_OnHrefClick = new();
-
-	/// <summary>
-	/// Hyperlink Click Event
-	/// </summary>
-	public HrefClickEvent onHrefClick {
-		get { return m_OnHrefClick; }
-		set { m_OnHrefClick = value; }
-	}
-
-	/// <summary>
-	/// Image Pool
-	/// </summary>
-	private readonly List<Image> m_ImagesPool = new();
-	private readonly List<GameObject> culled_ImagesPool = new();
-
-	// Used for check for culling images
-	private bool clearImages = false;
-
-	// Lock to ensure images get culled properly
-	private UnityEngine.Object thisLock = new();
-
-	/// <summary>
-	/// Vertex Index
-	/// </summary>
-	private readonly List<int> m_ImagesVertexIndex = new();
-
-	/// <summary>
-	/// Regular expression to replace 
-	/// </summary>
-	private static readonly Regex s_Regex =
-		new(@"<quad name=(.+?) size=(\d*\.?\d+%?) width=(\d*\.?\d+%?) />", RegexOptions.Singleline);
-
-	/// <summary>
-	/// Hyperlink Regular Expression
-	/// </summary>
-	private static readonly Regex s_HrefRegex =
-		new(@"<a href=([^>\n\s]+)>(.*?)(</a>)", RegexOptions.Singleline);
-
-	// String to create quads
-	private string fixedString;
-
-	// Update the quad images when true
-	private bool updateQuad = false;
-
-	/// <summary>
-	/// After parsing the final text
-	/// </summary>
-	private string m_OutputText;
-
-	private Button button;
-
-	// Used for custom selection as a variable for other scripts
-	private bool selected = false;
-
-	public bool Selected {
-		get { return selected; }
-		set { selected = value; }
-	}
-
-	// Positions of images for icon placement
-	private List<Vector2> positions = new();
-
-	// Little hack to support multiple hrefs with same name
-	private string previousText = "";
-
-	/// <summary>
-	/// Hyperlinks Info
-	/// </summary>
-	[Serializable]
-	public class HrefInfo {
-		public int startIndex;
-
-		public int endIndex;
-
-		public string name;
-
-		public readonly List<Rect> boxes = new();
-	}
-
-	/// <summary>
-	/// Hyperlink List
-	/// </summary>
-	private readonly List<HrefInfo> m_HrefInfos = new();
-
-	/// <summary>
-	/// Text Builder
-	/// </summary>
-	private static readonly StringBuilder s_TextBuilder = new();
-
-	// Matches for quad tags
-	private MatchCollection matches;
-
-	// Matches for quad tags
-	private MatchCollection href_matches;
-
-	// Matches for removing characters
-	private MatchCollection removeCharacters;
-
-	// Index of current pic
-	private int picIndex;
-
-	// Index of current pic vertex
-	private int vertIndex;
-
-	/// <summary>
-	/// Unity 2019.1.5 Fixes to text placement resulting from the removal of verts for spaces and non rendered characters
-	/// </summary>
-
-	// There is no directive for incremented versions so will have to hack together
-	private bool usesNewRendering = false;
-
-#if UNITY_2019_1_OR_NEWER
-	/// <summary>
-	/// Regular expression to remove non rendered characters
-	/// </summary>
-	private static readonly Regex remove_Regex =
-		new(@"<b>|</b>|<i>|</i>|<size=.*?>|</size>|<color=.*?>|</color>|<material=.*?>|</material>|<quad name=(.+?) size=(\d*\.?\d+%?) width=(\d*\.?\d+%?) />|<a href=([^>\n\s]+)>|</a>|\s", RegexOptions.Singleline);
-
-	// List of indexes that are compared against matches to remove quad tags
-	List<int> indexes = new();
-
-	// Characters to remove from string for finding the correct index for vertices for images
-	private int charactersRemoved = 0;
-
-	// Characters to remove from string for finding the correct start index for vertices for href bounds
-	private int startCharactersRemoved = 0;
-
-	// Characters to remove from string for finding the correct end index for vertices for href bounds
-	private int endCharactersRemoved = 0;
-#endif
-
-	// Count of current href
-	private int count = 0;
-
-	// Index of current href
-	private int indexText = 0;
-
-	// Original text temporary variable holder
-	private string originalText;
-
-	// Vertex we are modifying
-	private UIVertex vert;
-
-	// Local Point for Href
-	private Vector2 lp;
-
-
-	/// METHODS ///
-
-	public void ResetIcons() {
-		Reset_m_HrefInfos();
-		base.Start();
-	}
-
-	protected void UpdateQuadImage() {
-#if UNITY_EDITOR && !UNITY_2018_3_OR_NEWER
-            if (UnityEditor.PrefabUtility.GetPrefabType(this) == UnityEditor.PrefabType.Prefab) {
-                return;
-            }
-#endif
-		m_OutputText = GetOutputText();
-
-		matches = s_Regex.Matches(m_OutputText);
-
-		if (matches != null && matches.Count > 0) {
-			for (int i = 0; i < matches.Count; i++) {
-				m_ImagesPool.RemoveAll(image => image == null);
-
-				if (m_ImagesPool.Count == 0) {
-					GetComponentsInChildren<Image>(true, m_ImagesPool);
-				}
-
-				if (matches.Count > m_ImagesPool.Count) {
-					DefaultControls.Resources resources = new();
-					GameObject go = DefaultControls.CreateImage(resources);
-
-					go.layer = gameObject.layer;
-
-					RectTransform rt = go.transform as RectTransform;
-
-					if (rt) {
-						rt.SetParent(rectTransform);
-						rt.anchoredPosition3D = Vector3.zero;
-						rt.localRotation = Quaternion.identity;
-						rt.localScale = Vector3.one;
-					}
-
-					m_ImagesPool.Add(go.GetComponent<Image>());
-				}
-
-				string spriteName = matches[i].Groups[1].Value;
-
-				Image img = m_ImagesPool[i];
-
-				Vector2 imgoffset = Vector2.zero;
-
-				if (img.sprite == null || img.sprite.name != spriteName) {
-					if (iconList != null && iconList.Count > 0) {
-						for (int s = 0; s < iconList.Count; s++) {
-							if (iconList[s].name == spriteName) {
-								img.sprite = iconList[s].sprite;
-								img.preserveAspect = true;
-								img.rectTransform.sizeDelta = new Vector2(fontSize * ImageScalingFactor * iconList[s].scale.x,
-																			fontSize * ImageScalingFactor * iconList[s].scale.y);
-								imgoffset = iconList[s].offset;
-
-								break;
-							}
-						}
-					}
-				}
-
-				img.enabled = true;
-
-				if (positions.Count > 0 && i < positions.Count) {
-					img.rectTransform.anchoredPosition = positions[i] += imgoffset;
-				}
-			}
-		} else {
-			// If there are no matches, remove the images from the pool
-			for (int i = m_ImagesPool.Count - 1; i > 0; i--) {
-				if (m_ImagesPool[i]) {
-					if (!culled_ImagesPool.Contains(m_ImagesPool[i].gameObject)) {
-						culled_ImagesPool.Add(m_ImagesPool[i].gameObject);
-						m_ImagesPool.Remove(m_ImagesPool[i]);
-					}
-				}
-			}
-		}
-
-		// Remove any images that are not being used
-		for (int i = m_ImagesPool.Count - 1; i >= matches.Count; i--) {
-			if (i >= 0 && m_ImagesPool.Count > 0) {
-				if (m_ImagesPool[i]) {
-					if (!culled_ImagesPool.Contains(m_ImagesPool[i].gameObject)) {
-						culled_ImagesPool.Add(m_ImagesPool[i].gameObject);
-						m_ImagesPool.Remove(m_ImagesPool[i]);
-					}
-				}
-			}
-		}
-
-		// Clear the images when it is safe to do so
-		if (culled_ImagesPool.Count > 0) {
-			clearImages = true;
-		}
-	}
-
-	// Reseting m_HrefInfos array if there is any change in text
-	void Reset_m_HrefInfos() {
-		previousText = text;
-
-		m_HrefInfos.Clear();
-
-		isCreating_m_HrefInfos = true;
-	}
-
-	/// <summary>
-	/// Finally, the output text hyperlinks get parsed
-	/// </summary>
-	/// <returns></returns>
-	protected string GetOutputText() {
-		s_TextBuilder.Length = 0;
-
-		indexText = 0;
-
-		fixedString = text;
-
-		if (iconList != null && iconList.Count > 0) {
-			for (int i = 0; i < iconList.Count; i++) {
-				if (!string.IsNullOrEmpty(iconList[i].name)) {
-					fixedString = fixedString.Replace(iconList[i].name,
-													"<quad name=" + iconList[i].name + " size=" + fontSize + " width=1 />");
-				}
-			}
-		}
-
-		count = 0;
-
-		href_matches = s_HrefRegex.Matches(fixedString);
-
-		if (href_matches != null && href_matches.Count > 0) {
-			for (int i = 0; i < href_matches.Count; i++) {
-				s_TextBuilder.Append(fixedString.Substring(indexText, href_matches[i].Index - indexText));
-				s_TextBuilder.Append("<color=" + hyperlinkColor + ">");  // Hyperlink color
-
-				var group = href_matches[i].Groups[1];
-
-				if (isCreating_m_HrefInfos) {
-					HrefInfo hrefInfo = new() {
-						// Hyperlinks in text starting index
-						startIndex = (usesNewRendering ? s_TextBuilder.Length : s_TextBuilder.Length * 4),
-						endIndex = (usesNewRendering ? (s_TextBuilder.Length + href_matches[i].Groups[2].Length - 1) : (s_TextBuilder.Length + href_matches[i].Groups[2].Length - 1) * 4 + 3),
-						name = group.Value
-					};
-
-					m_HrefInfos.Add(hrefInfo);
-				} else {
-					if (count <= m_HrefInfos.Count - 1) {
-						// Hyperlinks in text starting index
-						m_HrefInfos[count].startIndex = (usesNewRendering ? s_TextBuilder.Length : s_TextBuilder.Length * 4);
-						m_HrefInfos[count].endIndex = (usesNewRendering ? (s_TextBuilder.Length + href_matches[i].Groups[2].Length - 1) : (s_TextBuilder.Length + href_matches[i].Groups[2].Length - 1) * 4 + 3);
-
-						count++;
-					}
-				}
-
-				s_TextBuilder.Append(href_matches[i].Groups[2].Value);
-				s_TextBuilder.Append("</color>");
-
-				indexText = href_matches[i].Index + href_matches[i].Length;
-			}
-		}
-
-		// we should create array only once or if there is any change in the text
-		if (isCreating_m_HrefInfos)
-			isCreating_m_HrefInfos = false;
-
-		s_TextBuilder.Append(fixedString.Substring(indexText, fixedString.Length - indexText));
-
-		m_OutputText = s_TextBuilder.ToString();
-
-		m_ImagesVertexIndex.Clear();
-
-		matches = s_Regex.Matches(m_OutputText);
-
-#if UNITY_2019_1_OR_NEWER
-		href_matches = s_HrefRegex.Matches(m_OutputText);
-
-		indexes.Clear();
-
-		for (int r = 0; r < matches.Count; r++) {
-			indexes.Add(matches[r].Index);
-		}
-#endif
-
-
-		if (matches != null && matches.Count > 0) {
-			for (int i = 0; i < matches.Count; i++) {
-				picIndex = matches[i].Index;
-
-#if UNITY_2019_1_OR_NEWER
-				if (usesNewRendering) {
-					charactersRemoved = 0;
-
-					removeCharacters = remove_Regex.Matches(m_OutputText);
-
-					for (int r = 0; r < removeCharacters.Count; r++) {
-						if (removeCharacters[r].Index < picIndex && !indexes.Contains(removeCharacters[r].Index)) {
-							charactersRemoved += removeCharacters[r].Length;
-						}
-					}
-
-					for (int r = 0; r < i; r++) {
-						charactersRemoved += (matches[r].Length - 1);
-					}
-
-					picIndex -= charactersRemoved;
-				}
-#endif
-
-				vertIndex = picIndex * 4 + 3;
-
-				m_ImagesVertexIndex.Add(vertIndex);
-			}
-		}
-
-#if UNITY_2019_1_OR_NEWER
-		if (usesNewRendering) {
-			if (m_HrefInfos != null && m_HrefInfos.Count > 0) {
-				for (int i = 0; i < m_HrefInfos.Count; i++) {
-					startCharactersRemoved = 0;
-					endCharactersRemoved = 0;
-
-					removeCharacters = remove_Regex.Matches(m_OutputText);
-
-					for (int r = 0; r < removeCharacters.Count; r++) {
-						if (removeCharacters[r].Index < m_HrefInfos[i].startIndex && !indexes.Contains(removeCharacters[r].Index)) {
-							startCharactersRemoved += removeCharacters[r].Length;
-						} else if (removeCharacters[r].Index < m_HrefInfos[i].startIndex && indexes.Contains(removeCharacters[r].Index)) {
-							startCharactersRemoved += removeCharacters[r].Length - 1;
-						}
-
-						if (removeCharacters[r].Index < m_HrefInfos[i].endIndex && !indexes.Contains(removeCharacters[r].Index)) {
-							endCharactersRemoved += removeCharacters[r].Length;
-						} else if (removeCharacters[r].Index < m_HrefInfos[i].endIndex && indexes.Contains(removeCharacters[r].Index)) {
-							endCharactersRemoved += removeCharacters[r].Length - 1;
-						}
-					}
-
-					m_HrefInfos[i].startIndex -= startCharactersRemoved;
-
-					m_HrefInfos[i].startIndex = m_HrefInfos[i].startIndex * 4;
-
-					m_HrefInfos[i].endIndex -= endCharactersRemoved;
-
-					m_HrefInfos[i].endIndex = m_HrefInfos[i].endIndex * 4 + 3;
-				}
-			}
-		}
-#endif
-
-		return m_OutputText;
-	}
-
-	// Process href links to open them as a url, can override this function for custom functionality
-	public virtual void OnHrefClick(string hrefName) {
-		Application.OpenURL(hrefName);
-
-		// Debug.Log(hrefName);
-	}
-
-
-	/// UNITY METHODS ///
-
-	protected override void OnPopulateMesh(VertexHelper toFill) {
-		originalText = m_Text;
-		m_Text = GetOutputText();
-
-		base.OnPopulateMesh(toFill);
-
-		m_DisableFontTextureRebuiltCallback = true;
-
-		m_Text = originalText;
-
-		positions.Clear();
-
-		vert = new UIVertex();
-
-		for (int i = 0; i < m_ImagesVertexIndex.Count; i++) {
-			int endIndex = m_ImagesVertexIndex[i];
-
-			if (endIndex < toFill.currentVertCount) {
-				toFill.PopulateUIVertex(ref vert, endIndex);
-
-				positions.Add(new Vector2((vert.position.x + fontSize / 2), (vert.position.y + fontSize / 2)) + imageOffset);
-
-				// Erase the lower left corner of the black specks
-				toFill.PopulateUIVertex(ref vert, endIndex - 3);
-
-				Vector3 pos = vert.position;
-
-				for (int j = endIndex, m = endIndex - 3; j > m; j--) {
-					toFill.PopulateUIVertex(ref vert, endIndex);
-					vert.position = pos;
-					toFill.SetUIVertex(vert, j);
-				}
-			}
-			//StartCoroutine(ClearUpPunctuationMode(this)); // 避首尾标点添加的
-		}
-
-		// Hyperlinks surround processing box
-		for (int h = 0; h < m_HrefInfos.Count; h++) {
-			m_HrefInfos[h].boxes.Clear();
-
-			if (m_HrefInfos[h].startIndex >= toFill.currentVertCount) {
-				continue;
-			}
-
-			// Hyperlink inside the text is added to surround the vertex index coordinate frame
-			toFill.PopulateUIVertex(ref vert, m_HrefInfos[h].startIndex);
-
-			Vector3 pos = vert.position;
-
-			Bounds bounds = new(pos, Vector3.zero);
-
-			for (int i = m_HrefInfos[h].startIndex, m = m_HrefInfos[h].endIndex; i < m; i++) {
-				if (i >= toFill.currentVertCount) {
-					break;
-				}
-
-				toFill.PopulateUIVertex(ref vert, i);
-
-				pos = vert.position;
-
-				// Wrap re-add surround frame
-				if (pos.x < bounds.min.x) {
-					m_HrefInfos[h].boxes.Add(new Rect(bounds.min, bounds.size));
-					bounds = new Bounds(pos, Vector3.zero);
-				} else {
-					bounds.Encapsulate(pos); // Extended enclosed box
-				}
-			}
-
-			m_HrefInfos[h].boxes.Add(new Rect(bounds.min, bounds.size));
-		}
-
-		// Update the quad images
-		updateQuad = true;
-
-		m_DisableFontTextureRebuiltCallback = false;
-	}
-
-	/// <summary>
-	/// Click event is detected whether to click a hyperlink text
-	/// </summary>
-	/// <param name="eventData"></param>
-	public void OnPointerClick(PointerEventData eventData) {
-		RectTransformUtility.ScreenPointToLocalPointInRectangle(
-			rectTransform, eventData.position, eventData.pressEventCamera, out lp);
-
-		for (int h = 0; h < m_HrefInfos.Count; h++) {
-			for (int i = 0; i < m_HrefInfos[h].boxes.Count; ++i) {
-				if (m_HrefInfos[h].boxes[i].Contains(lp)) {
-					m_OnHrefClick.Invoke(m_HrefInfos[h].name);
-					return;
-				}
-			}
-		}
-	}
-
-	public void OnPointerEnter(PointerEventData eventData) {
-		//do your stuff when highlighted
-		selected = true;
-
-		//if (m_ImagesPool.Count >= 1) {
-		//	for (int i = 0; i < m_ImagesPool.Count; i++) {
-		//		if (button != null && button.isActiveAndEnabled) {
-		//			m_ImagesPool[i].color = button.colors.highlightedColor;
-		//		}
-		//	}
-		//}
-	}
-
-	public void OnPointerExit(PointerEventData eventData) {
-		//do your stuff when highlighted
-		selected = false;
-
-		//if (m_ImagesPool.Count >= 1) {
-		//	for (int i = 0; i < m_ImagesPool.Count; i++) {
-		//		if (button != null && button.isActiveAndEnabled) {
-		//			m_ImagesPool[i].color = button.colors.normalColor;
-		//		} else {
-		//			m_ImagesPool[i].color = color;
-		//		}
-		//	}
-		//}
-	}
-
-	public void OnSelect(BaseEventData eventData) {
-		//do your stuff when selected
-		selected = true;
-
-		if (m_ImagesPool.Count >= 1) {
-			for (int i = 0; i < m_ImagesPool.Count; i++) {
-				if (button != null && button.isActiveAndEnabled) {
-					m_ImagesPool[i].color = button.colors.highlightedColor;
-				}
-			}
-		}
-	}
-
-	public void OnDeselect(BaseEventData eventData) {
-		//do your stuff when selected
-		selected = false;
-
-		if (m_ImagesPool.Count >= 1) {
-			for (int i = 0; i < m_ImagesPool.Count; i++) {
-				if (button != null && button.isActiveAndEnabled) {
-					m_ImagesPool[i].color = button.colors.normalColor;
-				}
-			}
-		}
-	}
-
-
-	public override void SetVerticesDirty() {
-		base.SetVerticesDirty();
-
-		// Update the quad images
-		updateQuad = true;
-	}
-
-#if UNITY_EDITOR
-	protected override void OnValidate() {
-		base.OnValidate();
-
-		// Update the quad images
-		updateQuad = true;
-	}
-#endif
-
-	protected override void OnEnable() {
-#if UNITY_2019_1_OR_NEWER
-		// Here is the hack to see if Unity is using the new rendering system for text
-		usesNewRendering = false;
-
-		if (Application.unityVersion.StartsWith("2019.1.")) {
-			if (!Char.IsDigit(Application.unityVersion[8])) {
-				int number = Convert.ToInt32(Application.unityVersion[7].ToString());
-
-				if (number > 4) {
-					usesNewRendering = true;
-				}
-			} else {
-				usesNewRendering = true;
-			}
-		} else {
-			usesNewRendering = true;
-		}
-#endif
-
-		base.OnEnable();
-
-		supportRichText = true;
-		alignByGeometry = true;
-
-		// Enable images on TextPic disable
-		if (m_ImagesPool.Count >= 1) {
-			for (int i = 0; i < m_ImagesPool.Count; i++) {
-				if (m_ImagesPool[i] != null) {
-					m_ImagesPool[i].enabled = true;
-				}
-			}
-		}
-
-		// Update the quads on re-enable
-		updateQuad = true;
-
-		this.onHrefClick.AddListener(OnHrefClick);
-	}
-
-	protected override void OnDisable() {
-		base.OnDisable();
-
-		// Disable images on TextPic disable
-		if (m_ImagesPool.Count >= 1) {
-			for (int i = 0; i < m_ImagesPool.Count; i++) {
-				if (m_ImagesPool[i] != null) {
-					m_ImagesPool[i].enabled = false;
-				}
-			}
-		}
-
-		this.onHrefClick.RemoveListener(OnHrefClick);
-	}
-
-	new void Start() {
-		button = GetComponent<Button>();
-		ResetIcons();
-	}
-
-	void LateUpdate() {
-		// Reset the hrefs if text is changed
-		if (previousText != text) {
-			Reset_m_HrefInfos();
-
-			// Update the quad on text change
-			updateQuad = true;
-		}
-
-		// Need to lock to remove images properly
-		lock (thisLock) {
-			// Can only update the images when it is not in a rebuild, this prevents the error
-			if (updateQuad) {
-				UpdateQuadImage();
-				updateQuad = false;
-			}
-
-			// Destroy any images that are not in use
-			if (clearImages) {
-				for (int i = 0; i < culled_ImagesPool.Count; i++) {
-					DestroyImmediate(culled_ImagesPool[i]);
-				}
-
-				culled_ImagesPool.Clear();
-
-				clearImages = false;
-			}
-		}
-	}
-
-}

+ 0 - 12
Assets/Resources/Controls/TextPic/TextPic.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 20e2896f5c5788d4c9603bb195d39418
-timeCreated: 1468515487
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Assets/Resources/Controls/Tooltip.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3683dd6cff6587a4bacbdc9aeb1e6e64
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 98
Assets/Resources/Controls/Tooltip/BasicTooltip.cs

@@ -1,98 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.EventSystems;
-using UnityEngine.UI.Extensions;
-
-[RequireComponent(typeof(RectTransform))]
-[AddComponentMenu("UI/Basic Tooltip")]
-public class BasicTooltip : MonoBehaviour {
-    private static BasicTooltipReceiver target;
-    private static TextPic textTitle, textDescription;
-
-    public string title;
-    [TextArea] public string description;
-
-    private RectTransform rectTransform;
-    void Awake() {
-        rectTransform = GetComponent<RectTransform>();
-        if (target == null) {
-            // 初始化控件获取
-            target = GameObject.Find("TooltipBasic").GetComponent<BasicTooltipReceiver>();
-            foreach (TextPic textMesh in target.GetComponentsInChildren<TextPic>()) {
-                if (textMesh.name == "TextTooltipBasicTitle") textTitle = textMesh;
-                if (textMesh.name == "TextTooltipBasicDescription") textDescription = textMesh;
-            }
-            // 清空
-            textTitle.text = ""; textTitle.gameObject.SetActive(false);
-            textDescription.text = "";
-        }
-        Update();
-    }
-
-    private bool _hovered = false;
-    private bool hovered {
-        get { return _hovered; }
-        set {
-            if (_hovered == value) return;
-            _hovered = value;
-            if (value) {
-                StartHover(UIExtensionsInputManager.MousePosition, true);
-            } else {
-                target.HideTooltip();
-            }
-        }
-    }
-    void Update() {
-        if (Camera.current == null) return; // 不知道为啥鼠标按下并移动的时候会有一瞬间让 Camera.current 变成 null
-        hovered = !ReorderableListElement.isAnythingDragging && // 拖动中不显示 Tooltip
-            RectTransformUtility.RectangleContainsScreenPoint(rectTransform, Input.mousePosition, Camera.current);
-        // 在显示时更新 Tooltip 内容
-        if (!hovered) return;
-        if (textTitle.rawText != title) { // 只在属性变化时更新
-            textTitle.text = title;
-            textTitle.gameObject.SetActive(title != string.Empty); // 如果标题为空就隐藏
-        }
-        if (textDescription.rawText != description) {
-            textDescription.text = description;
-        }
-        // 更新位置
-        StartHover(UIExtensionsInputManager.MousePosition);
-    }
-
-    #region "原始 Sender"
-
-    /// <summary>
-    /// This info is needed to make sure we make the necessary translations if the tooltip and this trigger are children of different space canvases
-    /// </summary>
-    private bool isChildOfOverlayCanvas = false;
-
-    void Start() {
-        //attempt to check if our canvas is overlay or not and check our "is overlay" accordingly
-        Canvas ourCanvas = GetComponentInParent<Canvas>();
-        if (ourCanvas && ourCanvas.renderMode == RenderMode.ScreenSpaceOverlay) {
-            isChildOfOverlayCanvas = true;
-        }
-    }
-
-    /// <summary>
-    /// Checks if the tooltip and the transform this trigger is attached to are children of differently-spaced Canvases
-    /// </summary>
-    public bool WorldToScreenIsRequired {
-        get {
-            return (isChildOfOverlayCanvas && target.guiMode == RenderMode.ScreenSpaceCamera) ||
-                (!isChildOfOverlayCanvas && target.guiMode == RenderMode.ScreenSpaceOverlay);
-        }
-    }
-    
-    //public void OnDeselect(BaseEventData eventData) {
-    //    hovered = false;
-    //}
-
-    void StartHover(Vector3 position, bool shouldCanvasUpdate = false) {
-        target.SetTooltip(position, shouldCanvasUpdate);
-    }
-
-    #endregion
-
-}

+ 0 - 11
Assets/Resources/Controls/Tooltip/BasicTooltip.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 61fc6dc11daac7343a01f1f9e8d5535a
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 283
Assets/Resources/Controls/Tooltip/BasicTooltipReceiver.cs

@@ -1,283 +0,0 @@
-//ToolTip is written by Emiliano Pastorelli, H&R Tallinn (Estonia), http://www.hammerandravens.com
-//Copyright (c) 2015 Emiliano Pastorelli, H&R - Hammer&Ravens, Tallinn, Estonia.
-//All rights reserved.
-//Redistribution and use in source and binary forms are permitted
-//provided that the above copyright notice and this paragraph are
-//duplicated in all such forms and that any documentation,
-//advertising materials, and other materials related to such
-//distribution and use acknowledge that the software was developed
-//by H&R, Hammer&Ravens. The name of the
-//H&R, Hammer&Ravens may not be used to endorse or promote products derived
-//from this software without specific prior written permission.
-//THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-//IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-namespace UnityEngine.UI.Extensions
-{
-    [RequireComponent(typeof(RectTransform))]
-    public class BasicTooltipReceiver : MonoBehaviour
-    {
-        private RectTransform _rectTransform, canvasRectTransform;
-
-        [Tooltip("The canvas used by the tooltip as positioning and scaling reference. Should usually be the root Canvas of the hierarchy this component is in")]
-        private Canvas canvas;
-
-        [Tooltip("Sets if tooltip triggers will run ForceUpdateCanvases and refresh the tooltip's layout group " +
-            "(if any) when hovered, in order to prevent momentousness misplacement sometimes caused by ContentSizeFitters")]
-        public bool tooltipTriggersCanForceCanvasUpdate = false;
-
-        /// <summary>
-        /// the tooltip's Layout Group, if any
-        /// </summary>
-        private LayoutGroup _layoutGroup;
-
-        //if the tooltip is inside a UI element
-        private bool _inside;
-
-        private float width, height;//, canvasWidth, canvasHeight;
-
-        public float YShift = 4,xShift = -20;
-
-        [HideInInspector]
-        public RenderMode guiMode;
-
-        private Camera _guiCamera;
-
-        public Camera GuiCamera
-        {
-            get
-            {
-                if (!_guiCamera) {
-                    _guiCamera = Camera.main;
-                }
-
-                return _guiCamera;
-            }
-        }
-
-        private Vector3 screenLowerLeft, screenUpperRight, shiftingVector;
-
-        /// <summary>
-        /// a screen-space point where the tooltip would be placed before applying X and Y shifts and border checks
-        /// </summary>
-        private Vector3 baseTooltipPos;
-
-        private Vector3 newTTPos;
-        private Vector3 adjustedNewTTPos;
-        private Vector3 adjustedTTLocalPos;
-        private Vector3 shifterForBorders;
-
-        private float borderTest;
-
-        void Reset() {
-            canvas = GetComponentInParent<Canvas>();
-            canvas = canvas.rootCanvas;
-        }
-
-        // Use this for initialization
-        public void Awake()
-        {
-            if (!canvas) {
-                canvas = GetComponentInParent<Canvas>();
-                canvas = canvas.rootCanvas;
-            }
-
-            _guiCamera = canvas.worldCamera;
-            guiMode = canvas.renderMode;
-            _rectTransform = GetComponent<RectTransform>();
-            canvasRectTransform = canvas.GetComponent<RectTransform>();
-            _layoutGroup = GetComponentInChildren<LayoutGroup>();
-
-            _inside = false;
-
-            gameObject.SetActive(false);
-
-            // Ç¿ÖÆÖö¥
-            transform.SetParent(canvasRectTransform, false);
-            transform.SetAsLastSibling();
-        }
-
-        //Call this function externally to set the text of the template and activate the tooltip
-        public void SetTooltip(Vector3 basePos, bool refreshCanvasesBeforeGetSize = false)
-        {
-            
-            baseTooltipPos = basePos;
-            ContextualTooltipUpdate(refreshCanvasesBeforeGetSize);
-
-        }
-
-        //call this function on mouse exit to deactivate the template
-        public void HideTooltip()
-        {
-            gameObject.SetActive(false);
-            _inside = false;
-        }
-
-        // Update is called once per frame
-        void Update()
-        {
-            if (_inside)
-            {
-                ContextualTooltipUpdate();
-            }
-        }
-
-        /// <summary>
-        /// forces rebuilding of Canvases in order to update the tooltip's content size fitting.
-        /// Can prevent the tooltip from being visibly misplaced for one frame when being resized.
-        /// Only runs if tooltipTriggersCanForceCanvasUpdate is true
-        /// </summary>
-        public void RefreshTooltipSize() {
-            if (tooltipTriggersCanForceCanvasUpdate) {
-                Canvas.ForceUpdateCanvases();
-
-                if (_layoutGroup) {
-                    _layoutGroup.enabled = false;
-                    _layoutGroup.enabled = true;
-                }
-                
-            }
-            
-        }
-
-        /// <summary>
-        /// Runs the appropriate tooltip placement method, according to the parent canvas's render mode
-        /// </summary>
-        /// <param name="refreshCanvasesBeforeGettingSize"></param>
-        public void ContextualTooltipUpdate(bool refreshCanvasesBeforeGettingSize = false) {
-            switch (guiMode) {
-                case RenderMode.ScreenSpaceCamera:
-                    OnScreenSpaceCamera(refreshCanvasesBeforeGettingSize);
-                    break;
-                case RenderMode.ScreenSpaceOverlay:
-                    OnScreenSpaceOverlay(refreshCanvasesBeforeGettingSize);
-                    break;
-            }
-        }
-
-        //main tooltip edge of screen guard and movement - camera
-        public void OnScreenSpaceCamera(bool refreshCanvasesBeforeGettingSize = false)
-        {
-            shiftingVector.x = xShift;
-            shiftingVector.y = YShift;
-
-            baseTooltipPos.z = canvas.planeDistance;
-
-            newTTPos = GuiCamera.ScreenToViewportPoint(baseTooltipPos - shiftingVector);
-            adjustedNewTTPos = GuiCamera.ViewportToWorldPoint(newTTPos);
-
-            gameObject.SetActive(true);
-
-            if (refreshCanvasesBeforeGettingSize) RefreshTooltipSize();
-
-            //consider scaled dimensions when comparing against the edges
-            width = transform.lossyScale.x * _rectTransform.sizeDelta[0];
-            height = transform.lossyScale.y * _rectTransform.sizeDelta[1];
-
-            // check and solve problems for the tooltip that goes out of the screen on the horizontal axis
-            
-            RectTransformUtility.ScreenPointToWorldPointInRectangle(canvasRectTransform, Vector2.zero, GuiCamera, out screenLowerLeft);
-            RectTransformUtility.ScreenPointToWorldPointInRectangle(canvasRectTransform, new Vector2(Screen.width, Screen.height), GuiCamera, out screenUpperRight);
-
-
-            //check for right edge of screen
-            borderTest = (adjustedNewTTPos.x + width);
-            if (borderTest > screenUpperRight.x)
-            {
-                shifterForBorders.x = borderTest - screenUpperRight.x;
-                adjustedNewTTPos.x -= shifterForBorders.x;
-            }
-            //check for left edge of screen
-            borderTest = (adjustedNewTTPos.x);
-            if (borderTest < screenLowerLeft.x)
-            {
-                shifterForBorders.x = screenLowerLeft.x - borderTest;
-                adjustedNewTTPos.x += shifterForBorders.x;
-            }
-
-            // check and solve problems for the tooltip that goes out of the screen on the vertical axis
-
-            //check for lower edge of the screen
-            borderTest = (adjustedNewTTPos.y - height);
-            if (borderTest < screenLowerLeft.y) {
-                shifterForBorders.y = screenLowerLeft.y - borderTest;
-                adjustedNewTTPos.y += shifterForBorders.y;
-            }
-
-            //check for upper edge of the screen
-            borderTest = (adjustedNewTTPos.y);
-            if (borderTest > screenUpperRight.y)
-            {
-                shifterForBorders.y = borderTest - screenUpperRight.y;
-                adjustedNewTTPos.y -= shifterForBorders.y;
-            }
-
-            //failed attempt to circumvent issues caused when rotating the camera
-            adjustedNewTTPos = transform.rotation * adjustedNewTTPos;
-            
-            transform.position = adjustedNewTTPos;
-            adjustedTTLocalPos = transform.localPosition;
-            adjustedTTLocalPos.z = 0;
-            transform.localPosition = adjustedTTLocalPos;
-
-            _inside = true;
-        }
-
-
-        //main tooltip edge of screen guard and movement - overlay
-        public void OnScreenSpaceOverlay(bool refreshCanvasesBeforeGettingSize = false) {
-            shiftingVector.x = xShift;
-            shiftingVector.y = YShift;
-            newTTPos = (baseTooltipPos - shiftingVector) / canvas.scaleFactor;
-            adjustedNewTTPos = newTTPos;
-
-            gameObject.SetActive(true);
-
-            if (refreshCanvasesBeforeGettingSize) RefreshTooltipSize();
-
-            width = _rectTransform.sizeDelta[0];
-            height = _rectTransform.sizeDelta[1];
-            
-            // check and solve problems for the tooltip that goes out of the screen on the horizontal axis
-            //screen's 0 = overlay canvas's 0 (always?)
-            screenLowerLeft = Vector3.zero;
-            screenUpperRight = canvasRectTransform.sizeDelta;
-
-            //check for right edge of screen
-            borderTest = (newTTPos.x + width);
-            if (borderTest > screenUpperRight.x) {
-                shifterForBorders.x = borderTest - screenUpperRight.x;
-                adjustedNewTTPos.x -= shifterForBorders.x;
-            }
-            //check for left edge of screen
-            borderTest = (adjustedNewTTPos.x);
-            if (borderTest < screenLowerLeft.x) {
-                shifterForBorders.x = screenLowerLeft.x - borderTest;
-                adjustedNewTTPos.x += shifterForBorders.x;
-            }
-
-            // check and solve problems for the tooltip that goes out of the screen on the vertical axis
-
-            //check for lower edge of the screen
-            borderTest = (adjustedNewTTPos.y - height);
-            if (borderTest < screenLowerLeft.y) {
-                shifterForBorders.y = screenLowerLeft.y - borderTest;
-                adjustedNewTTPos.y += shifterForBorders.y;
-            }
-
-            //check for upper edge of the screen
-            borderTest = (adjustedNewTTPos.y);
-            if (borderTest > screenUpperRight.y) {
-                shifterForBorders.y = borderTest - screenUpperRight.y;
-                adjustedNewTTPos.y -= shifterForBorders.y;
-            }
-            
-            //remove scale factor for the actual positioning of the TT
-            adjustedNewTTPos *= canvas.scaleFactor;
-            transform.position = adjustedNewTTPos;
-
-            _inside = true;
-        }
-    }
-}

+ 0 - 8
Assets/Resources/Controls/Tooltip/BasicTooltipReceiver.cs.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 2b17a5019c844e748b9546cde0350ed5
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 

BIN
Assets/Resources/Entities/Player.png


BIN
Assets/Resources/Entities/PlayerDown.png


+ 13 - 1
Assets/Resources/Entities/Player.png.meta → Assets/Resources/Entities/PlayerDown.png.meta

@@ -45,7 +45,7 @@ TextureImporter:
   spriteMode: 1
   spriteExtrude: 1
   spriteMeshType: 1
-  alignment: 0
+  alignment: 7
   spritePivot: {x: 0.5, y: 0.5}
   spritePixelsToUnits: 32
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}
@@ -100,6 +100,18 @@ TextureImporter:
     overridden: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

BIN
Assets/Resources/Entities/PlayerNormal.png


+ 39 - 3
Assets/Resources/Controls/TextPic/#coin.png.meta → Assets/Resources/Entities/PlayerNormal.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9d574feab34b8984e9210c0c93354199
+guid: fc138a3e426f0224f92ccc5065951ade
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}
@@ -45,9 +45,9 @@ TextureImporter:
   spriteMode: 1
   spriteExtrude: 1
   spriteMeshType: 1
-  alignment: 0
+  alignment: 7
   spritePivot: {x: 0.5, y: 0.5}
-  spritePixelsToUnits: 100
+  spritePixelsToUnits: 32
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}
   spriteGenerateFallbackPhysicsShape: 1
   alphaUsage: 1
@@ -76,6 +76,42 @@ TextureImporter:
     overridden: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Server
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 0 - 36
Assets/Resources/System/InputM.cs

@@ -1,36 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.EventSystems;
-using UnityEngine.Tilemaps;
-
-public class InputM : MonoBehaviour {
-
-    public void Update() {
-        // 检测键盘按下
-        foreach (KeyCode keyCode in keyboardEvent.Keys) {
-            if (Input.GetKeyUp(keyCode)) TriggerKeyboardEvent(keyCode);
-        }
-        // 检测鼠标按下
-        int? mouseButton = null;
-        if (Input.GetMouseButtonUp(0)) mouseButton = 0;
-        if (Input.GetMouseButtonUp(1)) mouseButton = 1;
-        if (mouseButton == null) return;
-    }
-
-    // 键盘按键绑定
-    public delegate void KeyboardEventDelegate();
-    private static Dictionary<KeyCode, KeyboardEventDelegate> keyboardEvent;
-    public void Awake() {
-        keyboardEvent = new();
-    }
-    public static void AddKeyboardEvent(KeyCode key, KeyboardEventDelegate onKeyClicked) {
-        Debug.Log("添加按键绑定:" + key.ToString());
-        keyboardEvent[key] = onKeyClicked;
-    }
-    public void TriggerKeyboardEvent(KeyCode key) {
-        Debug.Log("触发按键:" + key.ToString());
-        keyboardEvent[key].Invoke();
-    }
-
-}

+ 0 - 11
Assets/Resources/System/InputM.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c6a604d118c1a1048a8be03e40d92e94
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 18
Assets/Resources/System/MainM.cs

@@ -1,18 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class MainM : MonoBehaviour
-{
-    // Start is called before the first frame update
-    void Awake()
-    {
-        TextPic.ResetIconList();
-    }
-
-    // Update is called once per frame
-    void Update()
-    {
-        
-    }
-}

+ 0 - 11
Assets/Resources/System/MainM.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f3e554cbf343ad249a5e86a36c25e41e
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 27 - 9
Assets/Resources/System/PlayerController.cs

@@ -6,36 +6,54 @@ using UnityEngine;
 
 public class PlayerController : MonoBehaviour {
     private Rigidbody2D rb;
+    private SpriteRenderer sprite;
+    private BoxCollider2D coll;
     public LayerMask groundLayer;
+    public Sprite spriteNormal, spriteDown;
     void Start() {
         rb = GetComponent<Rigidbody2D>();
+        sprite = GetComponent<SpriteRenderer>();
+        coll = GetComponent<BoxCollider2D>();
     }
 
     public string keyLeft = "a", keyRight = "d", keyJump = "w", keyDown = "s";
-    public float movementSpeed = 10f, jumpForce = 20f, horizontalF = 0.9f, horizontalA = 0.3f, jumpThreshold = 0.1f, jumpDetectHeight = 0.8f;
-    public float jumpBufferTime = 0.2f, jumpWolfTime = 0.2f; private float jumpBuffer = 0f, jumpWolf = 0f;
-    void FixedUpdate() {
+    public float movementSpeed = 10f, jumpForce = 20f, horizontalF = 0.9f, horizontalA = 0.3f, jumpThreshold = 0.1f, downA = 0.3f;
+    public float jumpBufferTime = 0.2f, jumpWolfTime = 0.2f; private float jumpBuffer = 0f, jumpWolf = 0f, jumping = 0f;
+    void Update() {
         // 获取当前情况
         float speedX = rb.velocity.x, speedY = rb.velocity.y;
-        bool isGround = Physics2D.OverlapCircle(transform.position - new Vector3(0, jumpDetectHeight, 0), jumpThreshold, groundLayer);
-        bool isDown = Input.GetKey(keyDown) && isGround;
+        bool isDown = Input.GetKey(keyDown);
+        bool isGround = Physics2D.OverlapCircle(transform.position, jumpThreshold, groundLayer);
         int moveHorizontal = isDown ? 0 : // 没有下蹲
             (Input.GetKey(keyLeft) == Input.GetKey(keyRight) ? 0 : // 没有同时按住左右
             (Input.GetKey(keyLeft) ? -1 : 1)); // 获取方向
         // 判断跳跃
-        jumpBuffer -= Time.fixedDeltaTime;
-        if (Input.GetKeyDown(keyJump)) jumpBuffer = jumpBufferTime;
-        jumpWolf -= Time.fixedDeltaTime;
+        jumpBuffer -= Time.deltaTime; jumpWolf -= Time.deltaTime; jumping -= Time.deltaTime;
+        if (Input.GetKey(keyJump)) jumpBuffer = jumpBufferTime;
         if (isGround) jumpWolf = jumpWolfTime;
-        if (!isDown && jumpBuffer > 0 && jumpWolf > 0) { // 在地面、没有蹲下
+        if (!isDown && jumpBuffer > 0 && jumpWolf > 0 && jumping < 0) { // 在地面、没有蹲下
             speedY = jumpForce;
             jumpBuffer = 0;
+            jumping = 0.5f;
+        } else if (isDown) {
+            speedY -= downA;
+            if (speedY > 0) speedY = 0;
         }
         // 横向移动
         if (moveHorizontal != 0) {
             speedX = speedX * (1 - horizontalA) + movementSpeed * horizontalA * moveHorizontal;
         }
         speedX *= horizontalF;
+        // 蹲下
+        if (isDown) {
+            sprite.sprite = spriteDown;
+            coll.size = new Vector2(coll.size.x, 0.5f);
+            coll.offset = new Vector2(0, 0.35f);
+        } else {
+            sprite.sprite = spriteNormal;
+            coll.size = new Vector2(coll.size.x, 1.2f);
+            coll.offset = new Vector2(0, 0.7f);
+        }
         // 设置
         rb.velocity = new Vector2(speedX, speedY);
     }

+ 17 - 762
Assets/Scenes/SceneMain.unity

@@ -123,394 +123,6 @@ NavMeshSettings:
     debug:
       m_Flags: 0
   m_NavMeshData: {fileID: 0}
---- !u!1 &206329163
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 206329164}
-  - component: {fileID: 206329169}
-  - component: {fileID: 206329168}
-  - component: {fileID: 206329167}
-  - component: {fileID: 206329166}
-  - component: {fileID: 206329165}
-  - component: {fileID: 206329170}
-  m_Layer: 5
-  m_Name: UI Button
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &206329164
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  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: 381495606}
-  m_Father: {fileID: 757919350}
-  m_RootOrder: 1
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0.5, y: 1}
-  m_AnchorMax: {x: 0.5, y: 1}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 160, y: 50}
-  m_Pivot: {x: 0.5, y: 1}
---- !u!114 &206329165
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 61fc6dc11daac7343a01f1f9e8d5535a, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  title: "#coin \u6D4B\u8BD5 Tooltip"
-  description: "\u8FD9\u662F\u94B1 #coin \u3002\n\u8FD9\u662F\u7B2C\u4E8C\u884C\uFF0C\u4E5F\u6709\u4E00\u4E2A\u94B1
-    #coin\u2026\u2026"
---- !u!114 &206329166
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: aff1779809bf18948910d9cb13f1bfbc, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  OnButtonPress:
-    m_PersistentCalls:
-      m_Calls: []
-  OnButtonRelease:
-    m_PersistentCalls:
-      m_Calls: []
-  OnButtonHeld:
-    m_PersistentCalls:
-      m_Calls: []
---- !u!114 &206329167
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Navigation:
-    m_Mode: 3
-    m_WrapAround: 0
-    m_SelectOnUp: {fileID: 0}
-    m_SelectOnDown: {fileID: 0}
-    m_SelectOnLeft: {fileID: 0}
-    m_SelectOnRight: {fileID: 0}
-  m_Transition: 1
-  m_Colors:
-    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
-    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
-    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
-    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
-    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
-    m_ColorMultiplier: 1
-    m_FadeDuration: 0.1
-  m_SpriteState:
-    m_HighlightedSprite: {fileID: 0}
-    m_PressedSprite: {fileID: 0}
-    m_SelectedSprite: {fileID: 0}
-    m_DisabledSprite: {fileID: 0}
-  m_AnimationTriggers:
-    m_NormalTrigger: Normal
-    m_HighlightedTrigger: Highlighted
-    m_PressedTrigger: Pressed
-    m_SelectedTrigger: Selected
-    m_DisabledTrigger: Disabled
-  m_Interactable: 1
-  m_TargetGraphic: {fileID: 206329168}
-  m_OnClick:
-    m_PersistentCalls:
-      m_Calls: []
---- !u!114 &206329168
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
-  m_Type: 1
-  m_PreserveAspect: 0
-  m_FillCenter: 1
-  m_FillMethod: 4
-  m_FillAmount: 1
-  m_FillClockwise: 1
-  m_FillOrigin: 0
-  m_UseSpriteMesh: 0
-  m_PixelsPerUnitMultiplier: 1
---- !u!222 &206329169
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_CullTransparentMesh: 1
---- !u!114 &206329170
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 206329163}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 69beb381e244f92449b8c4cf954630e9, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_TrackedObjects:
-  - rid: 2680856002935652364
-  references:
-    version: 2
-    RefIds:
-    - rid: 2680856002935652364
-      type: {class: TrackedMonoBehaviourObject, ns: UnityEngine.Localization.PropertyVariants.TrackedObjects, asm: Unity.Localization}
-      data:
-        m_Target: {fileID: 206329165}
-        m_TrackedProperties:
-          items:
-          - rid: 2680856002935652365
-        m_UpdateType: 0
-        m_Changed:
-          m_PersistentCalls:
-            m_Calls: []
-    - rid: 2680856002935652365
-      type: {class: LocalizedStringProperty, ns: UnityEngine.Localization.PropertyVariants.TrackedProperties, asm: Unity.Localization}
-      data:
-        m_Localized:
-          m_TableReference:
-            m_TableCollectionName: GUID:e3f186d36085a4c16a16dd9c5dead58e
-          m_TableEntryReference:
-            m_KeyId: 147212595093504
-            m_Key: 
-          m_FallbackState: 0
-          m_WaitForCompletion: 0
-          m_LocalVariables: []
-        m_PropertyPath: title
---- !u!1 &381495605
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 381495606}
-  - component: {fileID: 381495608}
-  - component: {fileID: 381495609}
-  - component: {fileID: 381495610}
-  m_Layer: 5
-  m_Name: Text
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &381495606
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 381495605}
-  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: 206329164}
-  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 &381495608
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 381495605}
-  m_CullTransparentMesh: 1
---- !u!114 &381495609
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 381495605}
-  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: "\u4E2D\u6587\u6309\u94AE"
-  m_isRightToLeft: 0
-  m_fontAsset: {fileID: 11400000, guid: 283cec36496b84640a3220e6d4736677, type: 2}
-  m_sharedMaterial: {fileID: -4366241451420931623, guid: 283cec36496b84640a3220e6d4736677, type: 2}
-  m_fontSharedMaterials: []
-  m_fontMaterial: {fileID: 0}
-  m_fontMaterials: []
-  m_fontColor32:
-    serializedVersion: 2
-    rgba: 4278190080
-  m_fontColor: {r: 0, g: 0, b: 0, 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: 20
-  m_fontSizeBase: 20
-  m_fontWeight: 400
-  m_enableAutoSizing: 0
-  m_fontSizeMin: 18
-  m_fontSizeMax: 72
-  m_fontStyle: 0
-  m_HorizontalAlignment: 2
-  m_VerticalAlignment: 512
-  m_textAlignment: 65535
-  m_characterSpacing: 0
-  m_wordSpacing: 0
-  m_lineSpacing: 0
-  m_lineSpacingMax: 0
-  m_paragraphSpacing: 0
-  m_charWidthMaxAdj: 0
-  m_enableWordWrapping: 1
-  m_wordWrappingRatios: 0.4
-  m_overflowMode: 0
-  m_linkedTextComponent: {fileID: 0}
-  parentLinkedComponent: {fileID: 0}
-  m_enableKerning: 1
-  m_enableExtraPadding: 0
-  checkPaddingRequired: 0
-  m_isRichText: 1
-  m_parseCtrlCharacters: 1
-  m_isOrthographic: 1
-  m_isCullingEnabled: 0
-  m_horizontalMapping: 0
-  m_verticalMapping: 0
-  m_uvLineOffset: 0
-  m_geometrySortingOrder: 0
-  m_IsTextObjectScaleStatic: 0
-  m_VertexBufferAutoSizeReduction: 0
-  m_useMaxVisibleDescender: 1
-  m_pageToDisplay: 1
-  m_margin: {x: 0, y: 0, z: 0, w: 0}
-  m_isUsingLegacyAnimationComponent: 0
-  m_isVolumetricText: 0
-  m_hasFontAssetChanged: 0
-  m_baseMaterial: {fileID: 0}
-  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
---- !u!114 &381495610
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 381495605}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 69beb381e244f92449b8c4cf954630e9, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_TrackedObjects:
-  - rid: 2680856002935652354
-  references:
-    version: 2
-    RefIds:
-    - rid: 2680856002935652354
-      type: {class: TrackedUGuiGraphic, ns: UnityEngine.Localization.PropertyVariants.TrackedObjects, asm: Unity.Localization}
-      data:
-        m_Target: {fileID: 381495609}
-        m_TrackedProperties:
-          items:
-          - rid: 2680856002935652355
-          - rid: 2680856002935652357
-        m_UpdateType: 0
-    - rid: 2680856002935652355
-      type: {class: LocalizedStringProperty, ns: UnityEngine.Localization.PropertyVariants.TrackedProperties, asm: Unity.Localization}
-      data:
-        m_Localized:
-          m_TableReference:
-            m_TableCollectionName: GUID:e3f186d36085a4c16a16dd9c5dead58e
-          m_TableEntryReference:
-            m_KeyId: 145542393880576
-            m_Key: 
-          m_FallbackState: 0
-          m_WaitForCompletion: 0
-          m_LocalVariables: []
-        m_PropertyPath: m_text
-    - rid: 2680856002935652357
-      type: {class: FloatTrackedProperty, ns: UnityEngine.Localization.PropertyVariants.TrackedProperties, asm: Unity.Localization}
-      data:
-        m_PropertyPath: m_fontSizeBase
-        m_VariantData:
-        - localeIdentifier:
-            m_Code: zh-CN
-          value: 20
-        - localeIdentifier:
-            m_Code: en-US
-          value: 16
 --- !u!1 &557375725
 GameObject:
   m_ObjectHideFlags: 0
@@ -522,8 +134,8 @@ GameObject:
   - component: {fileID: 557375726}
   - component: {fileID: 557375730}
   - component: {fileID: 557375728}
-  - component: {fileID: 557375727}
   - component: {fileID: 557375731}
+  - component: {fileID: 557375727}
   m_Layer: 7
   m_Name: Player
   m_TagString: Untagged
@@ -540,7 +152,7 @@ Transform:
   m_GameObject: {fileID: 557375725}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: -1.44, y: -1.85, z: 0}
-  m_LocalScale: {x: 1, y: 1.7, z: 1}
+  m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 0}
@@ -561,16 +173,20 @@ MonoBehaviour:
   groundLayer:
     serializedVersion: 2
     m_Bits: 8
+  spriteNormal: {fileID: 21300000, guid: fc138a3e426f0224f92ccc5065951ade, type: 3}
+  spriteDown: {fileID: 21300000, guid: 833d67975e2fbe54db127baa2e5f9525, type: 3}
   keyLeft: a
   keyRight: d
   keyJump: w
+  keyDown: s
   movementSpeed: 30
-  jumpForce: 17
+  jumpForce: 20
   horizontalF: 0.8
   horizontalA: 0.07
   jumpThreshold: 0.05
-  jumpDetectHeight: 0.85
-  jumpBufferTime: 0.35
+  downA: 0.6
+  jumpBufferTime: 0.15
+  jumpWolfTime: 0.2
 --- !u!50 &557375728
 Rigidbody2D:
   serializedVersion: 4
@@ -590,7 +206,7 @@ Rigidbody2D:
   m_Material: {fileID: 6200000, guid: 6a9410bb3043e384eba63a5622b25c09, type: 2}
   m_Interpolate: 0
   m_SleepingMode: 1
-  m_CollisionDetection: 0
+  m_CollisionDetection: 1
   m_Constraints: 4
 --- !u!212 &557375730
 SpriteRenderer:
@@ -633,7 +249,7 @@ SpriteRenderer:
   m_SortingLayerID: 0
   m_SortingLayer: 0
   m_SortingOrder: 0
-  m_Sprite: {fileID: 21300000, guid: 833d67975e2fbe54db127baa2e5f9525, type: 3}
+  m_Sprite: {fileID: 21300000, guid: fc138a3e426f0224f92ccc5065951ade, type: 3}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_FlipX: 0
   m_FlipY: 0
@@ -643,7 +259,7 @@ SpriteRenderer:
   m_SpriteTileMode: 0
   m_WasSpriteAssigned: 1
   m_MaskInteraction: 0
-  m_SpriteSortPoint: 0
+  m_SpriteSortPoint: 1
 --- !u!61 &557375731
 BoxCollider2D:
   m_ObjectHideFlags: 0
@@ -657,18 +273,18 @@ BoxCollider2D:
   m_IsTrigger: 0
   m_UsedByEffector: 0
   m_UsedByComposite: 0
-  m_Offset: {x: 0, y: 0}
+  m_Offset: {x: 0, y: 0.7}
   m_SpriteTilingProperty:
     border: {x: 0, y: 0, z: 0, w: 0}
-    pivot: {x: 0.5, y: 0.5}
-    oldSize: {x: 1, y: 1}
+    pivot: {x: 0.5, y: 0}
+    oldSize: {x: 1, y: 1.59375}
     newSize: {x: 1, y: 1}
     adaptiveTilingThreshold: 0.5
     drawMode: 0
     adaptiveTiling: 0
   m_AutoTiling: 0
   serializedVersion: 2
-  m_Size: {x: 0.35, y: 0.8}
+  m_Size: {x: 0.35, y: 1.2}
   m_EdgeRadius: 0.1
 --- !u!1 &668639202
 GameObject:
@@ -792,9 +408,7 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 0, y: 0, z: 0}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 8876143183364460397}
-  - {fileID: 206329164}
+  m_Children: []
   m_Father: {fileID: 0}
   m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -2975,362 +2589,3 @@ AudioListener:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1926663700}
   m_Enabled: 1
---- !u!222 &1620944818439956789
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_CullTransparentMesh: 1
---- !u!1 &1829033697909245682
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 8876143183364460397}
-  - component: {fileID: 1620944818439956789}
-  - component: {fileID: 2919894849634025983}
-  - component: {fileID: 5665855036239528590}
-  - component: {fileID: 8876143183364460398}
-  - component: {fileID: 8234716032852976638}
-  - component: {fileID: 8876143183364460399}
-  m_Layer: 5
-  m_Name: TooltipBasic
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &1936729923238662714
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5179570208146231786}
-  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: 8876143183364460397}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &2014247559771088472
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2409642285932910226}
-  m_CullTransparentMesh: 1
---- !u!1 &2409642285932910226
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 2431164959275692734}
-  - component: {fileID: 2014247559771088472}
-  - component: {fileID: 2574718061799556154}
-  m_Layer: 5
-  m_Name: TextTooltipBasicDescription
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &2431164959275692734
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2409642285932910226}
-  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: 8876143183364460397}
-  m_RootOrder: 1
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &2574718061799556154
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 2409642285932910226}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 20e2896f5c5788d4c9603bb195d39418, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0.18867922, g: 0.18867922, b: 0.18867922, a: 1}
-  m_RaycastTarget: 0
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_FontData:
-    m_Font: {fileID: 12800000, guid: c7b3f6784e6f2ed498a6493a577e204e, type: 3}
-    m_FontSize: 16
-    m_FontStyle: 0
-    m_BestFit: 0
-    m_MinSize: 1
-    m_MaxSize: 40
-    m_Alignment: 0
-    m_AlignByGeometry: 1
-    m_RichText: 1
-    m_HorizontalOverflow: 0
-    m_VerticalOverflow: 0
-    m_LineSpacing: 1
-  m_Text: "\u8FD9\u662F Tooltip \u7684\u5185\u5BB9\u3002\u8FD9\u662F\u5185\u5BB9\u3002\u8FD9\u662F
-    Tooltip \u7684\u5185\u5BB9\u3002\n\u6240\u4EE5\u591A\u5199\u51E0\u884C =\u3002="
-  ImageScalingFactor: 1.05
-  hyperlinkColor: blue
-  imageOffset: {x: 0, y: -2.5}
-  isCreating_m_HrefInfos: 0
-  m_OnHrefClick:
-    m_PersistentCalls:
-      m_Calls: []
---- !u!222 &2850797845254938009
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5179570208146231786}
-  m_CullTransparentMesh: 1
---- !u!114 &2919894849634025983
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Padding:
-    m_Left: 15
-    m_Right: 15
-    m_Top: 14
-    m_Bottom: 15
-  m_ChildAlignment: 0
-  m_Spacing: 11
-  m_ChildForceExpandWidth: 1
-  m_ChildForceExpandHeight: 0
-  m_ChildControlWidth: 1
-  m_ChildControlHeight: 1
-  m_ChildScaleWidth: 1
-  m_ChildScaleHeight: 1
-  m_ReverseArrangement: 0
---- !u!1 &5179570208146231786
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1936729923238662714}
-  - component: {fileID: 2850797845254938009}
-  - component: {fileID: 5713323099320576141}
-  m_Layer: 5
-  m_Name: TextTooltipBasicTitle
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!114 &5665855036239528590
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: bd1fb96a7cff19c4b9c2afc0b7a1cb1f, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  _gradientType: 1
-  _blendMode: 2
-  _modifyVertices: 0
-  _offset: 0
-  _zoom: 1
-  _effectGradient:
-    serializedVersion: 2
-    key0: {r: 0.7924528, g: 0.7924528, b: 0.7924528, a: 0.78431374}
-    key1: {r: 0.8679245, g: 0.8679245, b: 0.8679245, a: 0.9019608}
-    key2: {r: 0, g: 0, b: 0, a: 0}
-    key3: {r: 0, g: 0, b: 0, a: 0}
-    key4: {r: 0, g: 0, b: 0, a: 0}
-    key5: {r: 0, g: 0, b: 0, a: 0}
-    key6: {r: 0, g: 0, b: 0, a: 0}
-    key7: {r: 0, g: 0, b: 0, a: 0}
-    ctime0: 4048
-    ctime1: 48188
-    ctime2: 65535
-    ctime3: 0
-    ctime4: 0
-    ctime5: 0
-    ctime6: 0
-    ctime7: 0
-    atime0: 5012
-    atime1: 30455
-    atime2: 0
-    atime3: 0
-    atime4: 0
-    atime5: 0
-    atime6: 0
-    atime7: 0
-    m_Mode: 0
-    m_NumColorKeys: 2
-    m_NumAlphaKeys: 2
---- !u!114 &5713323099320576141
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5179570208146231786}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 20e2896f5c5788d4c9603bb195d39418, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0, g: 0, b: 0, a: 1}
-  m_RaycastTarget: 0
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_FontData:
-    m_Font: {fileID: 12800000, guid: c7b3f6784e6f2ed498a6493a577e204e, type: 3}
-    m_FontSize: 20
-    m_FontStyle: 0
-    m_BestFit: 0
-    m_MinSize: 1
-    m_MaxSize: 40
-    m_Alignment: 0
-    m_AlignByGeometry: 1
-    m_RichText: 1
-    m_HorizontalOverflow: 0
-    m_VerticalOverflow: 0
-    m_LineSpacing: 1
-  m_Text: "\u6807\u9898"
-  ImageScalingFactor: 1.05
-  hyperlinkColor: blue
-  imageOffset: {x: 0, y: -2.5}
-  isCreating_m_HrefInfos: 0
-  m_OnHrefClick:
-    m_PersistentCalls:
-      m_Calls: []
---- !u!114 &8234716032852976638
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_HorizontalFit: 0
-  m_VerticalFit: 2
---- !u!224 &8876143183364460397
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 1}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 1936729923238662714}
-  - {fileID: 2431164959275692734}
-  m_Father: {fileID: 757919350}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: -299.99994, y: 0}
-  m_SizeDelta: {x: 300, y: 0}
-  m_Pivot: {x: 0, y: 1}
---- !u!114 &8876143183364460398
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 2b17a5019c844e748b9546cde0350ed5, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  tooltipTriggersCanForceCanvasUpdate: 0
-  YShift: 5
-  xShift: -30
-  guiMode: 0
---- !u!114 &8876143183364460399
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1829033697909245682}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_Sprite: {fileID: 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

+ 1 - 1
Assets/Resources/Controls/Form/MyForm.cs.meta → Assets/Scenes/Test.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 26eac2ccae1eba54e812c1746a6d9b9d
+guid: d07ded70ea5f2e944a41defb48dbe9d9
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
ProjectSettings/Physics2DSettings.asset

@@ -4,7 +4,7 @@
 Physics2DSettings:
   m_ObjectHideFlags: 0
   serializedVersion: 5
-  m_Gravity: {x: 0, y: -30}
+  m_Gravity: {x: 0, y: -40}
   m_DefaultMaterial: {fileID: 0}
   m_VelocityIterations: 8
   m_PositionIterations: 3