Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        timerScript = timer.GetComponent <Timer>();
        swipeScript = swipe.GetComponent <SwipeDetection>();

        timerScript.starting       = true;
        timerScript.nextStage      = false;
        timerScript.startCountdown = true;
        timerScript.nothing        = false;
        timerScript.lose           = false;
        Timer.tutorial             = true;

        tapToStart = false;
        taped      = false;
        next       = false;
        pause      = false;

        if (PlayerPrefs.HasKey("Index"))
        {
            index = PlayerPrefs.GetInt("Index");
        }
        else
        {
            index = 0;
        }

        orderText.GetComponent <TextMeshProUGUI>().text = "TAP TO START";
        //orderText.canvasRenderer.SetAlpha(0.1f);

        hiScoreText.text  = "High Score: " + PlayerPrefs.GetInt("High Score", 0).ToString();
        hiScoreText2.text = hiScoreText.text;
        bestText.text     = PlayerPrefs.GetInt("High Score", 0).ToString();
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        timerScript = timer.GetComponent <Timer>();
        swipeScript = swipe.GetComponent <SwipeDetection>();

        timerScript.starting  = true;
        timerScript.nextStage = false;
        timerScript.lose      = false;
        orderText.GetComponent <TextMeshProUGUI>().text = "TAP TO START";
    }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        timerScript = timer.GetComponent <Timer>();
        swipeScript = swipe.GetComponent <SwipeDetection>();

        timerScript.starting       = true;
        timerScript.nextStage      = false;
        timerScript.startCountdown = true;
        timerScript.nothing        = false;
        timerScript.lose           = false;

        tapToStart = false;
        taped      = false;
        next       = false;

        orderText.GetComponent <TextMeshProUGUI>().text = "TAP TO START";
        //orderText.canvasRenderer.SetAlpha(0.1f);

        hiScoreText.text = "High Score: " + PlayerPrefs.GetInt("High Score", 0).ToString();
    }
 void Start()
 {
     Instance  = this;
     swipeArea = GameObject.Find("SnakeSwipeArea").GetComponent <SwipeDetection>();
 }
 private void Awake()
 {
     instance = this;
 }