예제 #1
0
 public static void GameResult(bool won)
 {
     if (won)
     {
         winWindow.Translate();
         GameChallenges.VisualizeStarsAtTheEnd();
     }
     else
     {
         instance.StopCoroutine(hurtIndicatorOnDying);
         loseWindow.Translate();
     }
     gameOver = true;
     instance.StopCoroutine(dark);
     dark = darkScreen.ChangeAlpha();
     instance.StartCoroutine(dark);
     instance.StartCoroutine(hurtIndicatorColor);
 }
예제 #2
0
    private void Start()
    {
        winWindow  = GameObject.FindWithTag("Win Window").GetComponent <UiMovement>();
        loseWindow = GameObject.FindWithTag("Lose Window").GetComponent <UiMovement>();
        darkScreen = GameObject.FindWithTag("Dark Screen").GetComponent <AlphaChanger>();
        dark       = darkScreen.ChangeAlpha();
        instance.StartCoroutine(dark);
        speed          = setSpeed;
        counter        = counter - offset;
        modifySpeed    = true;
        defaultBorders = setDefaultBorders;
        defaultOffsetX = setDefaultOffsetX;
        gameOver       = false;
        lastTiles      = new GameObject[3];
        stepBack       = new Vector3(0, 0, maxZValue);

        if (startTileIndex != -1)
        {
            SetTileWithIndex(startTileIndex);
        }
    }