Exemplo n.º 1
0
 void victory()
 {
     if (solveCount == puzzleCount && puzzleCount > 0 && (lives > 0 || TimeRemaining > 0)
         ||
         Input.GetKeyDown(KeyCode.Q))
     {
         if (levelSplitter.checkMe)
         {
             LevelSplitter.SetActive(true);
             LevelSplitter ls = LevelSplitter.GetComponent <LevelSplitter>();
             ls.minimap = ls.splitLevel.printTextures();
         }
         else
         {
             recordVictory();
         }
     }
 }
Exemplo n.º 2
0
    void Awake()
    {
        solveCount = 0;

        OverRect = new Rect(Screen.width * 0.2f, Screen.height * 0.1f, Screen.width * 0.6f, Screen.height * 0.8f);

        gameGUI       = GameObject.Find("GameGUI").GetComponent <GameGUI>();
        playerData    = GameObject.Find("PlayerData").GetComponent <PlayerData>();
        puzzleParser  = GameObject.Find("PuzzleGenerator").GetComponent <PuzzleParser>();
        levelSplitter = LevelSplitter.GetComponent <LevelSplitter>();
        TimeRemaining = puzzleParser.currentPuzzle.rows.Count *
                        puzzleParser.currentPuzzle.rows[0].cells.Count * 12;

        levelIndex = puzzleParser.currentLevelIndex;

        watcher += victory;
        watcher += defeat;
        watcher += countdown;
        watcher += overDetect;
    }