예제 #1
0
파일: Bird.cs 프로젝트: rufusgerm/mad-birds
    private void Update()
    {
        RenderArrows();

        if (transform.position.y > 10 ||
            transform.position.x > 40 ||
            transform.position.x < -20 ||
            transform.position.y < -15
            )
        {
            //Implement Overall Level Clamping
        }

        if (_birdWasLaunched &&
            GetComponent <Rigidbody2D>().velocity.magnitude <= 0.1
            )
        {
            amountOfTimeIdling += Time.deltaTime;
        }


        //Instantiate a reset button
        if (amountOfTimeIdling > 3 && _birdWasLaunched && !uiDialog.isGameOver)
        {
            uiDialog.ActivateResetDialog();
        }
    }