public void InitializeReel(int _dif, PC_SlotMachine _machine, Sprite[] iconsArray) { m_machine = _machine; m_slipping = 0; m_topPosition = m_icons[0].transform.localPosition; m_topPos = m_topPosition.y; m_reel = new List <int>(); int length = m_iconspool.GetLength(1); int val; for (int i = 0; i < length; i++) { val = m_iconspool[_dif, i]; m_reel.Add(val); if (!_machine.m_reelIcons.ContainsKey(val)) { _machine.m_reelIcons.Add(val, iconsArray[val]); } } Shuffle(m_reel); m_index = Random.Range(0, m_reel.Count); for (int i = 0; i < m_icons.Length; i++) { int num = m_index - i; if (num < 0) { num += m_reel.Count; } float _y = m_topPos - i * m_offset; m_icons[i].SetIconData(m_machine.m_reelIcons[m_reel[num]], m_reel[num], _y); } m_topPosMultiplier = m_offset * 5; m_initialized = true; }
public PC_SlotMachineScore(int _value, PC_SlotMachine _slotMachine) { Init(_value, _slotMachine); }
public void Init(int _value, PC_SlotMachine _slotMachine) { m_numberSprites = _slotMachine.m_numberSprites; SetScores(_value); }
public PC_SlotMachineScore(PC_SlotMachine _slotMachine) { Init(0, _slotMachine); ResetScore(); }