CapsuleGame class final
扭蛋机玩法策略;可直接交给 LuckyGameView 或自定义后端。
- Inheritance
-
- Object
- LuckyGame<
CapsuleConfig, CapsuleLayout, CapsuleFrame, LuckyResult< CapsulePrize> > - CapsuleGame
Constructors
- CapsuleGame()
-
创建无状态玩法。
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
itemGeometry
→ LuckyItemGeometry<
CapsuleLayout, CapsuleFrame> ? -
可选条目几何;未提供时不支持条目叠加。
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wantsPanGestures → bool
-
是否启用拖动手势。
no setterinherited
Methods
-
collectImages(
CapsuleConfig config, CapsuleLayout layout) → List< LuckyImageRequest> -
收集开蛋卡片图片;百分比尺寸以卡片宽高解析。
override
-
computeLayout(
CapsuleConfig config, LuckyLayoutInput input) → CapsuleLayout -
计算布局与卡片内容。
override
-
createController(
) → CapsuleController -
创建宿主拥有的控制器。
override
-
createDefaultRenderer(
) → CapsuleCanvasRenderer -
创建默认 Canvas 后端。
override
-
handlePan(
LuckyController< CapsuleConfig, CapsuleLayout, CapsuleFrame, LuckyResult< controller, CapsuleLayout layout, LuckyPanEvent event) → voidCapsulePrize> > -
接收拖动事件;默认无操作。
inherited
-
hitTestAll(
CapsuleConfig config, CapsuleLayout layout, CapsuleFrame frame, Offset position) → List< LuckyHit> -
旋钮为按钮零;结算后托盘胶囊与展开卡片命中奖品。
override
-
isStructuralChange(
CapsuleConfig oldConfig, CapsuleConfig newConfig) → bool -
胶囊映射、数量或奖品变化需要延后到结算后应用。
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveConfig(
BuildContext context, CapsuleConfig config) → CapsuleConfig -
系统要求减弱动效(或显式 always)时去掉物理参数,回退参数化轨迹。
override
-
semanticsLabel(
CapsuleConfig config) → String -
默认无障碍标签。
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited