Beispiel #1
0
 // Use this for initialization
 void Awake()
 {
     _piecesHolder = GameObject.Find("piecesHolder");
     _previewHolder = GameObject.Find("previewHolder");
     _gridCtrl = GetComponent<GridCtrl>();
     RollNext();
 }
Beispiel #2
0
 // Use this for initialization
 void Awake()
 {
     _repeated      = new List <int>();
     _piecesHolder  = GameObject.Find("piecesHolder");
     _previewHolder = GameObject.Find("previewHolder");
     _gridCtrl      = GetComponent <GridCtrl>();
     _pieceRng      = new System.Random(Guid.NewGuid().GetHashCode());
     _rotationRng   = new System.Random(Guid.NewGuid().GetHashCode());
     RollNext();
 }
Beispiel #3
0
 void Awake()
 {
     _playing        = true;
     _isInTurbo      = false;
     _gridCtrl       = GetComponent <GridCtrl>();
     _inputCtrl      = GetComponent <InputCtrl>();
     _rowRemover     = GetComponent <RowRemover>();
     _fallRoutine    = FallAndWait();
     _speedUpRoutine = SpeedUpOverTime();
 }
Beispiel #4
0
 void Awake()
 {
     _playing = true;
     _isInTurbo = false;
     _gridCtrl = GetComponent<GridCtrl>();
     _inputCtrl = GetComponent<InputCtrl>();
     _rowRemover = GetComponent<RowRemover>();
     _fallRoutine = FallAndWait();
     _scoreView = GameObject.Find("text_ScoreValue").GetComponent<TextMesh>();
 }
Beispiel #5
0
 protected void ProgressOperation_ProgressDataOuput(object sender, ProDataOutputEventArgs e)
 {
     Datas.Add(e.Data);
     if (Datas.Count == 1)
     {
         GridCtrl.Invoke(new Action(() =>
         {
             GridCtrl.DataSource = null;
             GridCtrl.DataSource = new BindingList <object>(Datas);
         }));
     }
     GridCtrl.RefreshDataSource();
 }
    // Use this for initialization
    void Start()
    {
        _grid         = GameObject.FindGameObjectWithTag("Grid").GetComponent <GridCtrl>();
        _piecesHolder = GameObject.FindGameObjectWithTag("piecesHolder");

        if (transform.parent.parent == _piecesHolder.transform)
        {
            Hide();
        }
        else
        {
            Show();
        }
    }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     _gridCtrl = GetComponent<GridCtrl>();
     SetupLines(transform.Find("Separators"));
 }
Beispiel #8
0
 void Awake()
 {
     _grid   = GetComponent <GridCtrl>();
     _pieces = new Dictionary <float, List <GameObject> >();
 }