Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ReelSymbolObject:
- using UnityEngine;
- using System.Collections;
- public class ReelSymbolObject
- {
- public int symbol_id;
- public int win_anim_id;
- public float[] current_pos;
- public float[] default_pos;
- public float current_pos_x;
- public float current_pos_y;
- public float current_pos_z;
- public float default_pos_x;
- public float default_pos_y;
- public float default_pos_z;
- public float rot_inc;
- public float rez_inc;
- public int curr_dir;
- public float curr_rot;
- public float units_spun;
- public float elapsed_time_2d;
- public ReelSymbolObject()
- {
- symbol_id = -1;
- win_anim_id = -1;
- current_pos = new float[3] { 0, 0, 0 };
- default_pos = new float[3] { 0, 0, 0 };
- rot_inc = 0;
- rez_inc = 0;
- curr_dir = ReelScene.SPIN_DIR_DOWN;
- curr_rot = 0;
- units_spun = 0;
- elapsed_time_2d = 0;
- }
- }
- ReelSymbolGroup:
- using UnityEngine;
- using System.Collections;
- public class ReelSymbolGroup
- {
- public int group_id;
- public int next_group_id;
- public int syms_per_second;
- public int num_syms_to_spin;
- public float spin_time;
- public float spin_start_time;
- public float prev_time;
- public float interval_units;
- public int spin_direction;
- public ReelScene.SPIN_STATE spin_state;
- public int nonwin_anim_id;
- public int win_anim_id;
- public ReelSymbolObject[] symbols;
- public ReelSymbolGroup()
- {
- group_id = -1;
- next_group_id = -1;
- syms_per_second = 0;
- num_syms_to_spin = 0;
- spin_time = 0;
- spin_start_time = 0;
- prev_time = 0;
- interval_units = 0;
- spin_direction = ReelScene.SPIN_DIR_DOWN;
- spin_state = ReelScene.SPIN_STATE.SPIN_NOT_STARTED;
- nonwin_anim_id = -1;
- win_anim_id = -1;
- symbols = new ReelSymbolObject[7];
- for (int i = 0; i < 7; i++)
- symbols[i] = new ReelSymbolObject();
- }
- }
- Code to initialise data:
- private ReelSymbolGroup[] m_reelSymbolGroup;
- private ReelSymbolObject[] m_reelVisibleSymbols;
- private ReelSymbolManager m_reelSymbolManager;
- private GameHud m_gameHud;
- static public ReelScene getInstance()
- {
- if (_instance == null)
- {
- _instance = new ReelScene();
- }
- return _instance;
- }
- public ReelSymbolGroup[] SymbolGroup
- {
- get { return m_reelSymbolGroup; }
- }
- public ReelSymbolObject[] VisibleSymbols
- {
- get { return m_reelVisibleSymbols; }
- }
- public ReelScene()
- {
- // Construct symbol group and visible data
- m_reelSymbolGroup = new ReelSymbolGroup[5];
- for (int i = 0; i < 5; i++)
- m_reelSymbolGroup[i] = new ReelSymbolGroup();
- m_reelVisibleSymbols = new ReelSymbolObject[1024];
- for (int i = 0; i < 1024; i++)
- m_reelVisibleSymbols[i] = new ReelSymbolObject();
- m_gameHud = new GameHud();
- }
Add Comment
Please, Sign In to add comment