DESKTOP-FB72PO8\Administrator 4 ay önce
ebeveyn
işleme
118b46dbf5

+ 65 - 1
Assets/Res/UI/HeroDetailPanel.prefab

@@ -958,6 +958,7 @@ GameObject:
   - component: {fileID: 3984027647546827249}
   - component: {fileID: 4278573007763961679}
   - component: {fileID: 2882279113304648121}
+  - component: {fileID: 5778152472333127121}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: Button_Skill
@@ -1077,6 +1078,21 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson/all.txt
     packgSpritePath: Assets/Res/UIAtlas/all.spriteatlasv2
     lasetJsonGUID: ace5466faa841bb7b9046587aae54d38
+--- !u!114 &5778152472333127121
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 721139631384940681}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e30737fa9d44e934eb9236105be999f6, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  duration: 0.07
+  ease: 5
+  animationSizeDelta: {x: 0.2, y: 0.2, z: 0}
 --- !u!1 &731879025552473058
 GameObject:
   m_ObjectHideFlags: 0
@@ -2515,6 +2531,7 @@ GameObject:
   - component: {fileID: 3309520447706144299}
   - component: {fileID: 1966616225348447026}
   - component: {fileID: 4704716257281283673}
+  - component: {fileID: 1615348523701919367}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: Button_Promote
@@ -2634,6 +2651,21 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
+--- !u!114 &1615348523701919367
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2292960775602257974}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e30737fa9d44e934eb9236105be999f6, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  duration: 0.07
+  ease: 5
+  animationSizeDelta: {x: 0.2, y: 0.2, z: 0}
 --- !u!1 &2348262451627925547
 GameObject:
   m_ObjectHideFlags: 0
@@ -6443,6 +6475,7 @@ GameObject:
   - component: {fileID: 3023931315167218065}
   - component: {fileID: 4897809077674143419}
   - component: {fileID: 8897748400449352481}
+  - component: {fileID: 5112434379379205867}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: Button_Back
@@ -6561,6 +6594,21 @@ MonoBehaviour:
     packgJsonPath: /Art/UIAssets/TextrueJson/all.txt
     packgSpritePath: Assets/Res/UIAtlas/all.spriteatlasv2
     lasetJsonGUID: ace5466faa841bb7b9046587aae54d38
+--- !u!114 &5112434379379205867
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5297465538665595607}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e30737fa9d44e934eb9236105be999f6, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  duration: 0.07
+  ease: 5
+  animationSizeDelta: {x: 0.2, y: 0.2, z: 0}
 --- !u!1 &5315175790152181287
 GameObject:
   m_ObjectHideFlags: 0
@@ -7002,6 +7050,7 @@ GameObject:
   - component: {fileID: 6920444595140807751}
   - component: {fileID: 6339542083778085456}
   - component: {fileID: 2876329134272659471}
+  - component: {fileID: 6539102124630620801}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: Button_Upgrade
@@ -7121,6 +7170,21 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
+--- !u!114 &6539102124630620801
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5664409606135363520}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: e30737fa9d44e934eb9236105be999f6, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  duration: 0.07
+  ease: 5
+  animationSizeDelta: {x: 0.2, y: 0.2, z: 0}
 --- !u!1 &5664635391068350170
 GameObject:
   m_ObjectHideFlags: 0
@@ -7842,7 +7906,7 @@ RectTransform:
   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: 913.04346, y: 1624}
+  m_SizeDelta: {x: 750, y: 1624}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3592094474613093350
 CanvasRenderer:

+ 299 - 1
Assets/Res/UIPlayable/HeroDetailPanelTimeline.playable

@@ -1,5 +1,153 @@
 %YAML 1.1
 %TAG !u! tag:yousandi.cn,2023:
+--- !u!114 &-7366082953417260238
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 11aa0b29ff13eab449a39fa0f8c3c506, type: 3}
+  m_Name: RectTransformAnimationClip(Clone)(Clone)
+  m_EditorClassIdentifier: 
+  template:
+    _loopDuration: 0
+    _loopType: 0
+    _curve:
+      _curveType: 1
+      _easeType: 8
+      _animationCurve:
+        serializedVersion: 2
+        m_Curve:
+        - serializedVersion: 3
+          time: 0
+          value: 0
+          inSlope: 2
+          outSlope: 2
+          tangentMode: 0
+          weightedMode: 0
+          inWeight: 0
+          outWeight: 0
+        - serializedVersion: 3
+          time: 1
+          value: 1
+          inSlope: 0
+          outSlope: 0
+          tangentMode: 0
+          weightedMode: 0
+          inWeight: 0
+          outWeight: 0
+        m_PreInfinity: 2
+        m_PostInfinity: 2
+        m_RotationOrder: 4
+    _controlPosition: 0
+    _controlSize: 0
+    _controlRotation: 0
+    _controlScale: 1
+    _startValue:
+      _anchoredPosition: {x: 0, y: 0, z: 0}
+      _sizeDelta: {x: 0, y: 0}
+      _localRotation: {x: 0, y: 0, z: 0}
+      _localScale: {x: 1.2, y: 1.2, z: 1}
+    _endValue:
+      _anchoredPosition: {x: 0, y: 0, z: 0}
+      _sizeDelta: {x: 0, y: 0}
+      _localRotation: {x: 0, y: 0, z: 0}
+      _localScale: {x: 1, y: 1, z: 1}
+--- !u!114 &-4398279264670304355
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: ab997e120f9c3184195588497850c91e, type: 3}
+  m_Name: Rect Transform Animation Track
+  m_EditorClassIdentifier: 
+  m_Version: 3
+  m_AnimClip: {fileID: 0}
+  m_Locked: 0
+  m_Muted: 0
+  m_CustomPlayableFullTypename: 
+  m_Curves: {fileID: 0}
+  m_Parent: {fileID: 11400000}
+  m_Children: []
+  m_Clips:
+  - m_Version: 1
+    m_Start: 0
+    m_ClipIn: 0
+    m_Asset: {fileID: 6815057204545205745}
+    m_Duration: 0.2
+    m_TimeScale: 1
+    m_ParentTrack: {fileID: -4398279264670304355}
+    m_EaseInDuration: 0
+    m_EaseOutDuration: 0
+    m_BlendInDuration: -1
+    m_BlendOutDuration: -1
+    m_MixInCurve:
+      serializedVersion: 2
+      m_Curve:
+      - serializedVersion: 3
+        time: 0
+        value: 0
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      - serializedVersion: 3
+        time: 1
+        value: 1
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      m_PreInfinity: 2
+      m_PostInfinity: 2
+      m_RotationOrder: 4
+    m_MixOutCurve:
+      serializedVersion: 2
+      m_Curve:
+      - serializedVersion: 3
+        time: 0
+        value: 1
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      - serializedVersion: 3
+        time: 1
+        value: 0
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      m_PreInfinity: 2
+      m_PostInfinity: 2
+      m_RotationOrder: 4
+    m_BlendInCurveMode: 0
+    m_BlendOutCurveMode: 0
+    m_ExposedParameterNames: []
+    m_AnimationCurves: {fileID: 0}
+    m_Recordable: 0
+    m_PostExtrapolationMode: 0
+    m_PreExtrapolationMode: 0
+    m_PostExtrapolationTime: 0
+    m_PreExtrapolationTime: 0
+    m_DisplayName: RectTransformAnimationClip
+  m_Markers:
+    m_Objects: []
 --- !u!114 &11400000
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -13,10 +161,160 @@ MonoBehaviour:
   m_Name: HeroDetailPanelTimeline
   m_EditorClassIdentifier: 
   m_Version: 0
-  m_Tracks: []
+  m_Tracks:
+  - {fileID: -4398279264670304355}
+  - {fileID: 3098885728808021784}
   m_FixedDuration: 0
   m_EditorSettings:
     m_Framerate: 60
     m_ScenePreview: 1
   m_DurationMode: 0
   m_MarkerTrack: {fileID: 0}
+--- !u!114 &3098885728808021784
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: ab997e120f9c3184195588497850c91e, type: 3}
+  m_Name: Rect Transform Animation Track (1)
+  m_EditorClassIdentifier: 
+  m_Version: 3
+  m_AnimClip: {fileID: 0}
+  m_Locked: 0
+  m_Muted: 0
+  m_CustomPlayableFullTypename: 
+  m_Curves: {fileID: 0}
+  m_Parent: {fileID: 11400000}
+  m_Children: []
+  m_Clips:
+  - m_Version: 1
+    m_Start: 0.2
+    m_ClipIn: 0
+    m_Asset: {fileID: -7366082953417260238}
+    m_Duration: 0.18333333333333335
+    m_TimeScale: 1
+    m_ParentTrack: {fileID: 3098885728808021784}
+    m_EaseInDuration: 0
+    m_EaseOutDuration: 0
+    m_BlendInDuration: -1
+    m_BlendOutDuration: -1
+    m_MixInCurve:
+      serializedVersion: 2
+      m_Curve:
+      - serializedVersion: 3
+        time: 0
+        value: 0
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      - serializedVersion: 3
+        time: 1
+        value: 1
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      m_PreInfinity: 2
+      m_PostInfinity: 2
+      m_RotationOrder: 4
+    m_MixOutCurve:
+      serializedVersion: 2
+      m_Curve:
+      - serializedVersion: 3
+        time: 0
+        value: 1
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      - serializedVersion: 3
+        time: 1
+        value: 0
+        inSlope: 0
+        outSlope: 0
+        tangentMode: 0
+        weightedMode: 0
+        inWeight: 0
+        outWeight: 0
+      m_PreInfinity: 2
+      m_PostInfinity: 2
+      m_RotationOrder: 4
+    m_BlendInCurveMode: 0
+    m_BlendOutCurveMode: 0
+    m_ExposedParameterNames: []
+    m_AnimationCurves: {fileID: 0}
+    m_Recordable: 0
+    m_PostExtrapolationMode: 0
+    m_PreExtrapolationMode: 0
+    m_PostExtrapolationTime: 0
+    m_PreExtrapolationTime: 0
+    m_DisplayName: RectTransformAnimationClip
+  m_Markers:
+    m_Objects: []
+--- !u!114 &6815057204545205745
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 11aa0b29ff13eab449a39fa0f8c3c506, type: 3}
+  m_Name: RectTransformAnimationClip
+  m_EditorClassIdentifier: 
+  template:
+    _loopDuration: 0
+    _loopType: 0
+    _curve:
+      _curveType: 1
+      _easeType: 8
+      _animationCurve:
+        serializedVersion: 2
+        m_Curve:
+        - serializedVersion: 3
+          time: 0
+          value: 0
+          inSlope: 2
+          outSlope: 2
+          tangentMode: 0
+          weightedMode: 0
+          inWeight: 0
+          outWeight: 0
+        - serializedVersion: 3
+          time: 1
+          value: 1
+          inSlope: 0
+          outSlope: 0
+          tangentMode: 0
+          weightedMode: 0
+          inWeight: 0
+          outWeight: 0
+        m_PreInfinity: 2
+        m_PostInfinity: 2
+        m_RotationOrder: 4
+    _controlPosition: 0
+    _controlSize: 0
+    _controlRotation: 0
+    _controlScale: 1
+    _startValue:
+      _anchoredPosition: {x: 0, y: 0, z: 0}
+      _sizeDelta: {x: 0, y: 0}
+      _localRotation: {x: 0, y: 0, z: 0}
+      _localScale: {x: 0, y: 0, z: 0}
+    _endValue:
+      _anchoredPosition: {x: 0, y: 0, z: 0}
+      _sizeDelta: {x: 0, y: 0}
+      _localRotation: {x: 0, y: 0, z: 0}
+      _localScale: {x: 1.2, y: 1.2, z: 1}

+ 21 - 1
Assets/Scenes/testCombat.scene

@@ -680,7 +680,7 @@ Canvas:
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
   m_VertexColorAlwaysGammaSpace: 0
-  m_AdditionalShaderChannelsFlag: 0
+  m_AdditionalShaderChannelsFlag: 25
   m_UpdateRectTransformForStandalone: 0
   m_SortingLayerID: 0
   m_SortingOrder: 0
@@ -904,6 +904,7 @@ GameObject:
   m_Component:
   - component: {fileID: 1324294697}
   - component: {fileID: 1324294698}
+  - component: {fileID: 1324294699}
   m_Layer: 5
   m_HasEditorInfo: 1
   m_Name: LoadSlider
@@ -984,6 +985,25 @@ MonoBehaviour:
   m_OnValueChanged:
     m_PersistentCalls:
       m_Calls: []
+--- !u!320 &1324294699
+PlayableDirector:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1324294696}
+  m_Enabled: 1
+  serializedVersion: 3
+  m_PlayableAsset: {fileID: 11400000, guid: 185c5bcffa9aa1941b49529246fc7c68, type: 2}
+  m_InitialState: 1
+  m_WrapMode: 2
+  m_DirectorUpdateMode: 1
+  m_InitialTime: 0
+  m_SceneBindings:
+  - key: {fileID: -4398279264670304355, guid: 185c5bcffa9aa1941b49529246fc7c68, type: 2}
+    value: {fileID: 1324294697}
+  m_ExposedReferences:
+    m_References: []
 --- !u!1660057539 &9223372036854775807
 SceneRoots:
   m_ObjectHideFlags: 0

+ 2 - 1
Assets/Scripts/Core/Fort23.Core.asmdef

@@ -10,7 +10,8 @@
         "GUID:fdb14afa911c65e4982db867bfd7afce",
         "GUID:d8b63aba1907145bea998dd612889d6b",
         "GUID:5efd170ecd8084500bed5692932fe14e",
-        "GUID:a5baed0c9693541a5bd947d336ec7659"
+        "GUID:a5baed0c9693541a5bd947d336ec7659",
+        "GUID:3b570a5146f9d4f0fa107ed4559471a3"
     ],
     "includePlatforms": [],
     "excludePlatforms": [],

+ 65 - 0
Assets/Scripts/Core/UI/UTool/ButtonAnimation.cs

@@ -0,0 +1,65 @@
+using System.Collections;
+using System.Collections.Generic;
+using LitMotion;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using RectTransform = UnityEngine.RectTransform;
+
+public class ButtonAnimation : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
+{
+    // [Header("Components")] [SerializeField]
+    RectTransform rectTransform;
+    // [SerializeField] TMP_Text text;
+
+    [Header("Settings")] [SerializeField] float duration = 0.07f;
+    [SerializeField] Ease ease = Ease.OutQuad;
+    [SerializeField] Vector3 animationSizeDelta = new(0.2f, 0.2f);
+    // [SerializeField] float animationFontSizeDelta = 1f;
+
+    Vector3 initialSize;
+    float initialFontSize;
+
+    CompositeMotionHandle motionHandles = new();
+
+    void Start()
+    {
+        rectTransform = GetComponent<RectTransform>();
+        initialSize = rectTransform.localScale;
+        // initialFontSize = text.fontSize;
+    }
+
+    void OnDestroy()
+    {
+        motionHandles.Cancel();
+    }
+
+    public void OnPointerDown(PointerEventData eventData)
+    {
+        motionHandles.Cancel();
+
+        LMotion.Create(rectTransform.localScale, initialSize - animationSizeDelta, duration)
+            .WithEase(ease).Bind(Bind)
+            // .BindToSizeDelta(rectTransform)
+            .AddTo(motionHandles);
+
+        // LMotion.Create(text.fontSize, initialFontSize - animationFontSizeDelta, duration)
+        //     .WithEase(ease)
+        //     .BindToFontSize(text)
+        //     .AddTo(motionHandles);
+    }
+
+    private void Bind(Vector3 size)
+    {
+        rectTransform.localScale = size;
+    }
+
+    public void OnPointerUp(PointerEventData eventData)
+    {
+        motionHandles.Cancel();
+
+        LMotion.Create(rectTransform.localScale, initialSize, duration)
+            .WithEase(ease)
+            .Bind(Bind)
+            .AddTo(motionHandles);
+    }
+}

+ 11 - 0
Assets/Scripts/Core/UI/UTool/ButtonAnimation.cs.meta

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

+ 1 - 0
Packages/manifest.json

@@ -1,6 +1,7 @@
 {
   "dependencies": {
     "cn.tuanjie.minigame.host": "1.0.4",
+    "com.annulusgames.lit-motion": "https://github.com/AnnulusGames/LitMotion.git?path=src/LitMotion/Assets/LitMotion",
     "com.code-philosophy.hybridclr": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
     "com.harumak.unityuiplayables": "https://github.com/Haruma-K/UnityUIPlayables.git?path=/Assets/UnityUIPlayables",
     "com.qq.weixin.minigame": "https://gitee.com/wechat-minigame/minigame-tuanjie-transform-sdk.git",

+ 11 - 0
Packages/packages-lock.json

@@ -7,6 +7,17 @@
       "dependencies": {},
       "url": "https://packages.tuanjie.cn"
     },
+    "com.annulusgames.lit-motion": {
+      "version": "https://github.com/AnnulusGames/LitMotion.git?path=src/LitMotion/Assets/LitMotion",
+      "depth": 0,
+      "source": "git",
+      "dependencies": {
+        "com.unity.burst": "1.6.0",
+        "com.unity.collections": "1.5.1",
+        "com.unity.mathematics": "1.0.1"
+      },
+      "hash": "99e865bcf34ad734e4c67f17e43a4cf12b6dbab8"
+    },
     "com.code-philosophy.hybridclr": {
       "version": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
       "depth": 0,