超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -13,42 +13,42 @@ using EasingCore;
|
||||
namespace FancyScrollView
|
||||
{
|
||||
/// <summary>
|
||||
/// グリッドレイアウトのスクロールビューを実装するための抽象基底クラス.
|
||||
/// 無限スクロールおよびスナップには対応していません.
|
||||
/// <see cref="FancyScrollView{TItemData, TContext}.Context"/> が不要な場合は
|
||||
/// 代わりに <see cref="FancyGridView{TItemData}"/> を使用します.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <typeparam name="TItemData">アイテムのデータ型.</typeparam>
|
||||
/// <typeparam name="TContext"><see cref="FancyScrollView{TItemData, TContext}.Context"/> の型.</typeparam>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
public abstract class FancyGridView<TItemData, TContext> : FancyScrollRect<TItemData[], TContext>
|
||||
where TContext : class, IFancyGridViewContext, new()
|
||||
{
|
||||
/// <summary>
|
||||
/// デフォルトのセルグループクラス.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
protected abstract class DefaultCellGroup : FancyCellGroup<TItemData, TContext> { }
|
||||
|
||||
/// <summary>
|
||||
/// 最初にセルを配置する軸方向のセル同士の余白.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
[SerializeField] protected float startAxisSpacing = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// 最初にセルを配置する軸方向のセル数.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
[SerializeField] protected int startAxisCellCount = 4;
|
||||
|
||||
/// <summary>
|
||||
/// セルのサイズ.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
[SerializeField] protected Vector2 cellSize = new Vector2(100f, 100f);
|
||||
|
||||
/// <summary>
|
||||
/// セルのグループ Prefab.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <see cref="FancyGridView{TItemData, TContext}"/> では,
|
||||
/// <see cref="FancyScrollView{TItemData, TContext}.CellPrefab"/> を最初にセルを配置する軸方向のセルコンテナとして使用します.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </remarks>
|
||||
protected sealed override GameObject CellPrefab => cellGroupTemplate;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace FancyScrollView
|
||||
: cellSize.y;
|
||||
|
||||
/// <summary>
|
||||
/// アイテムの総数.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
public int DataCount { get; private set; }
|
||||
|
||||
@@ -82,8 +82,8 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 最初にセルが生成される直前に呼び出されます.
|
||||
/// <see cref="Setup{TGroup}(FancyCell{TItemData, TContext})"/> メソッドを使用してセルテンプレートのセットアップを行ってください.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// <code><![CDATA[
|
||||
@@ -103,10 +103,10 @@ namespace FancyScrollView
|
||||
protected abstract void SetupCellTemplate();
|
||||
|
||||
/// <summary>
|
||||
/// セルテンプレートのセットアップを行います.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="cellTemplate">セルのテンプレート.</param>
|
||||
/// <typeparam name="TGroup">セルグループの型.</typeparam>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
protected virtual void Setup<TGroup>(FancyCell<TItemData, TContext> cellTemplate)
|
||||
where TGroup : FancyCell<TItemData[], TContext>
|
||||
{
|
||||
@@ -118,9 +118,9 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 渡されたアイテム一覧に基づいて表示内容を更新します.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="items">アイテム一覧.</param>
|
||||
/// Documentation text normalized.
|
||||
public virtual void UpdateContents(IList<TItemData> items)
|
||||
{
|
||||
DataCount = items.Count;
|
||||
@@ -137,10 +137,10 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指定したアイテムの位置までジャンプします.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">アイテムのインデックス.</param>
|
||||
/// <param name="alignment">ビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).</param>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
protected override void JumpTo(int itemIndex, float alignment = 0.5f)
|
||||
{
|
||||
var groupIndex = itemIndex / startAxisCellCount;
|
||||
@@ -148,12 +148,12 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指定したアイテムの位置まで移動します.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">アイテムのインデックス.</param>
|
||||
/// <param name="duration">移動にかける秒数.</param>
|
||||
/// <param name="alignment">ビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).</param>
|
||||
/// <param name="onComplete">移動が完了した際に呼び出されるコールバック.</param>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
protected override void ScrollTo(int itemIndex, float duration, float alignment = 0.5f, Action onComplete = null)
|
||||
{
|
||||
var groupIndex = itemIndex / startAxisCellCount;
|
||||
@@ -161,13 +161,13 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 指定したアイテムの位置まで移動します.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="itemIndex">アイテムのインデックス.</param>
|
||||
/// <param name="duration">移動にかける秒数.</param>
|
||||
/// <param name="easing">移動に使用するイージング.</param>
|
||||
/// <param name="alignment">ビューポート内におけるセル位置の基準. 0f(先頭) ~ 1f(末尾).</param>
|
||||
/// <param name="onComplete">移動が完了した際に呼び出されるコールバック.</param>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
protected override void ScrollTo(int itemIndex, float duration, Ease easing, float alignment = 0.5f, Action onComplete = null)
|
||||
{
|
||||
var groupIndex = itemIndex / startAxisCellCount;
|
||||
@@ -176,10 +176,10 @@ namespace FancyScrollView
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// グリッドレイアウトのスクロールビューを実装するための抽象基底クラス.
|
||||
/// 無限スクロールおよびスナップには対応していません.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <typeparam name="TItemData">アイテムのデータ型.</typeparam>
|
||||
/// Documentation text normalized.
|
||||
/// <seealso cref="FancyGridView{TItemData, TContext}"/>
|
||||
public abstract class FancyGridView<TItemData> : FancyGridView<TItemData, FancyGridViewContext> { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user