public void SwitchMode(SlotMode mode = null) { if (mode == null) { mode = current; if (mode == bonusMode) { if (slot.gameInfo.bonuses == 0) { mode = freeSpinMode; } } if (mode == freeSpinMode) { if (slot.gameInfo.bonuses > 0) { mode = bonusMode; } else if (slot.gameInfo.freeSpins == 0) { mode = defaultMode; } } if (mode == defaultMode) { if (slot.gameInfo.bonuses > 0) { mode = bonusMode; } else if (slot.gameInfo.freeSpins > 0) { mode = freeSpinMode; } } } if (mode != current) { slot.symbolManager.ApplySymbolMap(cleanMap, mode.symbolSwaps); SlotModeInfo info = new SlotModeInfo(current); current = mode; slot.callbacks.onSlotModeChange.Invoke(info); } }
private void ParseReels() { reelMap.Clear(); SlotMode cleanMode = new SlotMode(); foreach (SlotMode mode in new SlotMode[] { cleanMode, defaultMode, freeSpinMode, bonusMode }) { List <Symbol[]> r = new List <Symbol[]>(); for (int j = 0; j < reelLength; j++) { r.Add(new Symbol[symbolsPerReel]); } for (int x = 0; x < reelLength; x++) { for (int y = 0; y < symbolsPerReel; y++) { Symbol symbol = slot.reels[x].symbols[y]; if (mode.symbolSwaps != null) { for (int i = 0; i < mode.symbolSwaps.Count; i++) { if (symbol == mode.symbolSwaps[i].from) { symbol = mode.symbolSwaps[i].to; } } } r[x][y] = symbol; if (mode == cleanMode) { r[x][y].log.count++; } } } reelMap.Add(mode, r); } }
public void Initialize() { cleanMap = slot.symbolManager.GetSymbolMap(); current = defaultMode; }
public SlotModeInfo(SlotMode lastMode) { this.lastMode = lastMode; }
public int NewCostPerSpin(SlotMode mode) { return((defaultMode.costPerLine - mode.costPerLine) * lines.Length); }
public int CostPerSpin(SlotMode mode) { return(mode.costPerLine * lines.Length); }