virtual public void Init(SlotMachineUI slotUI) { _model = SlotModel.Instance; _slotConfig = _model.SlotConfig; _betting = _slotConfig.Betting; _ui = slotUI; _machine = _ui.SlotMachine; }
void Start() { _slotConfig = FindObjectOfType <SlotConfig>(); if (_slotConfig == null) { throw new NullReferenceException("SlotConfig can not be null!"); } MachineConfig = _slotConfig.MainMachine; _model = SlotModel.Instance; _model.Initialize(_slotConfig, this); _betting = _model.Betting; if (_slotConfig.DebugTestSpin) { gameObject.AddComponent <DebugHelper>(); } GamePool.SymbolLoad(_slotConfig); SetState(MachineState.Connecting); }
static public void SymbolLoad(SlotConfig config) { PoolMasterEvents.onPreloadPool += OnPreloadPool; //CreatePools var symbolPool = new Pool(POOL_SYMBOL); var machineList = config.MachineList; for (var i = 0; i < machineList.Count; ++i) { var machine = machineList[i]; var list = machine.SymbolDefineList; for (var j = 0; j < list.Count; ++j) { var symbolDefine = list[j]; symbolPool.uniquePool.Add(symbolDefine.prefab.gameObject); symbolPool.bufferAmount.Add(symbolDefine.buffer); } } _pool.pools.Add(symbolPool); //load _pool.Preload(POOL_SYMBOL); }
public void Initialize(SlotConfig config, SlotMachine startMachine) { SlotConfig = config; SetMachine(startMachine); }
public MachineConfig(SlotConfig relativeSlotConfig) { RelativeSlotConfig = relativeSlotConfig; }
virtual public void SettingByScript() { _slotConfig = GetComponent <SlotConfig>(); _soundPlayer = GetComponent <SlotSoundList>(); }