Exemplo n.º 1
0
 void StartTetris(Hashtable h)
 {
     currentIndex = 0;
     currentLevel = TetrisLevelMessage.GetLevelFromHashtable(h);
     RestartTetris(currentLevel);
     instantiatedCubes[currentLevel - 1] = new GameObject[NumberInGroup()];
     transform.position = locations[currentLevel - 1].transform.position;
     SpawnNext();
 }
Exemplo n.º 2
0
    void TetrisMode(Hashtable h)
    {
        currentMode         = Mode.transitionToTetris;
        transitionStartTime = Time.time;
        currentLevel        = TetrisLevelMessage.GetLevelFromHashtable(h);

        if (currentLevel == -1)
        {
            Debug.LogError("no location specified!");
        }
        if (currentLevel > tetrisLocations.Length)
        {
            Debug.LogError("not enough tetris locations specified");
        }
        // TODO lerp into tetris mode
        endPosition = tetrisLocations[currentLevel - 1].transform.position;
    }