Skip to content

Commit

Permalink
๐Ÿ‘ ใƒ—ใƒฉใƒ ใ‚’ๆ–œใ‚ใซๅฝ“ใฆใ‚‹ใ‚ˆใ†ใซใ—ใŸ
Browse files Browse the repository at this point in the history
  • Loading branch information
dicenull committed Sep 10, 2023
1 parent a9d502e commit 6c692ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/feature_slot/reel_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ReelComponent extends PositionComponent
// state
bool isRoll = false;
int stopIndex = -1;
final speed = 800;
final speed = 1000;

bool isStopReady = false;

Expand Down
11 changes: 8 additions & 3 deletions lib/feature_slot/slot_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ class SlotComponent extends PositionComponent with HasGameRef<SlotGame> {
for (var reel in reels) {
reel.roll();
}
zundamon.current = ZundamonState.idle;

zundamon.current = switch (gameRef.slotManager.phase.value) {
SlotPhase.miss => ZundamonState.idle,
_ => ZundamonState.chance,
};
for (var button in buttons) {
button.reset();
}
Expand All @@ -119,10 +123,11 @@ class SlotComponent extends PositionComponent with HasGameRef<SlotGame> {
if (!reels[index].isRoll) return;

// 0:ๆœ€ๅˆ, 1: ไบŒใค็›ฎ, 2:ๆœ€ๅพŒ
final count = reels.map((r) => r.isRoll).length;
final count = reels.where((r) => !r.isRoll).length;
final suberi = switch (gameRef.slotManager.phase.value) {
SlotPhase.replay => (SlotSymbol.replay, ReelPos.center),
SlotPhase.plum => (SlotSymbol.plum, ReelPos.center),
SlotPhase.plum => (SlotSymbol.plum, ReelPos.values[count]),
SlotPhase.zunda => (SlotSymbol.watermelon, ReelPos.top),
_ => null,
};

Expand Down

0 comments on commit 6c692ba

Please sign in to comment.