Exemplo n.º 1
0
 public void Initialize(Sequencer sequencer, SequencerUI vs, int height)
 {
     VisualSequencer = vs;
     //Sequencer = sequencer;
     Height      = height;
     initialized = true;
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         //DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 3
0
 public virtual void Initialize(Sequencer sequencer, SequencerUI vs, int stepNumber)
 {
     VisualSequencer = vs;
     Sequencer       = sequencer;
     Toggles         = new SequencerToggleUI[sequencer.StepSize];
     StepNumber      = stepNumber;
     for (int i = 0; i < sequencer.StepSize; i++)
     {
         Vector3 pos = transform.position + new Vector3(0, (i + 1) * spacement);
         Toggles[i] = Instantiate <GameObject>(togglePrefab.gameObject, pos, transform.rotation, transform).GetComponent <SequencerToggleUI>();
         Toggles[i].Initialize(Sequencer, this, i, Sequencer.Partition[StepNumber, i]);
     }
     initialized = true;
 }