Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     if (0 <= transform.position.x && transform.position.x <= 9)
     {
         if (!isValidGridPos())
         {
             Debug.Log("GAME OVER");
             Destroy(gameObject);
             GameOverFlag.End_flag = true;
             FinishGameBtn.displayFinishBtn();
         }
     }
     audiosource = GetComponent <AudioSource>();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        audiosource = GetComponent <AudioSource>();

        if (0 <= transform.position.x && transform.position.x <= 6 &&
            0 <= transform.position.z && transform.position.z <= 6 &&
            0 <= transform.position.y && transform.position.y <= 15)
        {
            // Default position not valid? Then it's game over
            if (!isValidGridPos())
            {
                Debug.Log("GAME OVER");
                Destroy(gameObject);
                GameOverFlag.End_flag = true;
                FinishGameBtn.displayFinishBtn();
            }

            FallPoint.setFallPoint(transform);
        }
    }