예제 #1
0
    void Start()
    {
        _cubeController = GetComponentInParent <CubeController>();
        _cubeBoosting   = GetComponentInParent <CubeBoosting>();
        _inputManager   = transform.parent.GetComponentInParent <InputManager>();
        _trails         = GetComponentsInChildren <TrailRenderer>();
        _trails[0].time = _trails[1].time = 0;
        firePs.SetActive(false);

        windPs.transform.position += new Vector3(0, 0, 10);
    }
예제 #2
0
    void Start()
    {
        InputManager         = GetComponent <InputManager>();
        InputManager.isAgent = true;

        _rb            = GetComponent <Rigidbody>();
        _airControl    = GetComponentInChildren <CubeAirControl>();
        _jumpControl   = GetComponentInChildren <CubeJumping>();
        _controller    = GetComponentInChildren <CubeController>();
        _boostControl  = GetComponentInChildren <CubeBoosting>();
        _groundControl = GetComponentInChildren <CubeGroundControl>();

        _ball   = transform.parent.Find("Ball");
        _rbBall = _ball.GetComponent <Rigidbody>();

        _mapData = transform.parent.Find("World").Find("Rocket_Map").GetComponent <MapData>();
    }