整合包

gameplay bundle has been imported together
This commit is contained in:
FloatGaming
2025-08-09 18:29:32 +08:00
parent e7962bf492
commit 1d818fa4eb
1654 changed files with 431813 additions and 103 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
* FancyScrollView (https://github.com/setchi/FancyScrollView)
* Copyright (c) 2020 setchi
* Licensed under MIT (https://github.com/setchi/FancyScrollView/blob/master/LICENSE)
*/
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace FancyScrollView.Example01
{
class Cell : FancyCell<ItemData>
{
[SerializeField] Animator animator = default;
[SerializeField] TMP_Text message = default;
static class AnimatorHash
{
public static readonly int Scroll = Animator.StringToHash("scroll");
}
public override void UpdateContent(ItemData itemData)
{
message.text = itemData.Message;
}
public override void UpdatePosition(float position)
{
currentPosition = position;
if (animator.isActiveAndEnabled)
{
animator.Play(AnimatorHash.Scroll, -1, position);
}
animator.speed = 0;
}
float currentPosition = 0;
void OnEnable() => UpdatePosition(currentPosition);
}
}