コード例 #1
0
    void Update()
    {
        gameTime.SetTime(gameTime.GetTime() - Time.deltaTime);

        if (gameTime.GetStateInt() == 1 && !seekerMove)
        {
            seekerMove             = true;
            seekerControls.enabled = true;
            seekerShop.enabled     = true;
        }

        if (gameTime.GetStateInt() == 2 && !tallyed)
        {
            EndGame(false);
        }

        if (gameTime.GetStateInt() == 3)
        {
            Application.LoadLevel(2);
        }

        if (statvr.GetActiveTraps() == 0 && statvr.GetGold(true) < 20)
        {
            if (outOfGoldBool)
            {
                outOfGoldBool = false;
                outOfGoldTime = Time.time + 10f;
            }

            if (Time.time > outOfGoldTime && !outOfGoldBool)
            {
                EndGame(false);
                seekerControls.enabled = false;
            }
        }
    }