using System.Collections.Generic;
namespace XericUI.BubbleLayout
{
///
/// 气泡布局插件基础接口,提供执行优先级
///
public interface IBubbleLayoutPlugin
{
///
/// 是否启用此插件,关闭后跳过所有流程
///
bool Enabled { get; }
///
/// 执行优先级,值越大越靠后执行
///
int Order { get; }
}
///
/// 气泡动画插件接口 —— 在动画阶段执行,负责添加力、速度等物理量
///
public interface IBubbleAnimationPlugin : IBubbleLayoutPlugin
{
///
/// 处理动画阶段,对每个气泡元素施加力/速度/动量等
///
/// 所有气泡元素数据列表
/// 帧间隔时间
void ProcessAnimation(List items, float deltaTime);
}
///
/// 气泡约束插件接口 —— 在约束阶段执行,负责限制位置、排列布局等
///
public interface IBubbleConstraintPlugin : IBubbleLayoutPlugin
{
///
/// 处理约束阶段,对气泡元素位置进行限制或排列
///
/// 所有气泡元素数据列表
/// 布局中心点
void ProcessConstraint(List items, UnityEngine.Vector2 layoutCenter);
}
}