Exemplo n.º 1
0
    void Start()
    {
        _defaultPlayer1Y   = GameObject.FindObjectOfType <Player1MoveScript>().transform.position.y;
        _jumpHeightP1      = _defaultPlayer1Y;
        _sinus             = Mathf.Sin(0.1f);
        _defaultRotationP1 = GameObject.FindObjectOfType <BankingP1Script>().transform.rotation.y;
        _rotationP1        = _defaultRotationP1;
        _player1Rotation   = GameObject.FindObjectOfType <BankingP1Script>().transform.rotation;
        if (GameObject.FindObjectOfType <ConfirmScript>().Tutorial == false)
        {
            _player2Rotation   = GameObject.FindObjectOfType <BankingP2Script>().transform.rotation;
            _defaultPlayer2Y   = GameObject.FindObjectOfType <Player2MoveScript>().transform.position.y;
            _defaultRotationP2 = GameObject.FindObjectOfType <BankingP2Script>().transform.rotation.y;
            _jumpHeightP2      = _defaultPlayer2Y;

            _rotationP2 = _defaultRotationP2;
        }

        _player1MoveScript = GameObject.FindObjectOfType <Player1MoveScript>();
        _bankingP1Script   = GameObject.FindObjectOfType <BankingP1Script>();
        _player2MoveScript = GameObject.FindObjectOfType <Player2MoveScript>();
        _bankingP2Script   = GameObject.FindObjectOfType <BankingP2Script>();
    }
Exemplo n.º 2
0
    void Start()
    {
        _defaultPlayer1Y = GameObject.FindObjectOfType<Player1MoveScript>().transform.position.y;
        _jumpHeightP1 = _defaultPlayer1Y;
        _sinus = Mathf.Sin(0.1f);
        _defaultRotationP1 = GameObject.FindObjectOfType<BankingP1Script>().transform.rotation.y;
        _rotationP1 = _defaultRotationP1;
        _player1Rotation = GameObject.FindObjectOfType<BankingP1Script>().transform.rotation;
        if (GameObject.FindObjectOfType<ConfirmScript>().Tutorial == false)
        {
        _player2Rotation = GameObject.FindObjectOfType<BankingP2Script>().transform.rotation;
            _defaultPlayer2Y = GameObject.FindObjectOfType<Player2MoveScript>().transform.position.y;
            _defaultRotationP2 = GameObject.FindObjectOfType<BankingP2Script>().transform.rotation.y;
            _jumpHeightP2 = _defaultPlayer2Y;

            _rotationP2 = _defaultRotationP2;
        }

        _player1MoveScript = GameObject.FindObjectOfType<Player1MoveScript>();
        _bankingP1Script = GameObject.FindObjectOfType<BankingP1Script>();
        _player2MoveScript = GameObject.FindObjectOfType<Player2MoveScript>();
        _bankingP2Script = GameObject.FindObjectOfType<BankingP2Script>();
    }