Пример #1
0
    void Start()
    {
        // init variables
        GameObject spinCtrl = GameObject.FindGameObjectWithTag("SpinController");

        camRotCtrl = spinCtrl.GetComponent <CameraRotationController>();

        if (freeRoamMode)
        {
            isMovingRight = false;
            isMovingLeft  = false;
            isJumping     = false;
        }
        else
        {
            isMovingRight = true;
            isMovingLeft  = false;
            isJumping     = false;
        }

        boostMod       = false;
        boostAnimTimer = 0.0f;

        // restrict the character from moving in the z-direction
        GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePositionZ;
    }
Пример #2
0
    void Start()
    {
        plyr     = GameObject.FindGameObjectWithTag("Player");
        plyrCtrl = plyr.GetComponent <PlayerController>();

        camRotCtrl = GameObject.FindGameObjectWithTag("SpinController").GetComponent <CameraRotationController>();

        ps = this.gameObject.GetComponent <ParticleSystem>();

        modCube = this.transform.parent.FindChild("ModifierCube");

        collided           = false;
        collisionAnimTimer = 0.0f;

        endRotationAnim = false;
    }
Пример #3
0
    void Start()
    {
        plyr = GameObject.FindGameObjectWithTag("Player");
        plyrCtrl = plyr.GetComponent<PlayerController>();

        camRotCtrl = GameObject.FindGameObjectWithTag("SpinController").GetComponent<CameraRotationController>();

        ps = this.gameObject.GetComponent<ParticleSystem>();

        modCube = this.transform.parent.FindChild("ModifierCube");

        collided = false;
        collisionAnimTimer = 0.0f;

        endRotationAnim = false;
    }
Пример #4
0
 void Start()
 {
     clickController          = new ClickController(this, _camera);
     cameraRotationController = new CameraRotationController(_camera.transform, cameraRotationRadius, cameraRotationSpeed);
 }
Пример #5
0
    void Start()
    {
        // init variables
        GameObject spinCtrl = GameObject.FindGameObjectWithTag("SpinController");
        camRotCtrl = spinCtrl.GetComponent<CameraRotationController>();

        if( freeRoamMode ) {
            isMovingRight = false;
            isMovingLeft = false;
            isJumping = false;
        }
        else {
            isMovingRight = true;
            isMovingLeft = false;
            isJumping = false;
        }

        boostMod = false;
        boostAnimTimer = 0.0f;

        // restrict the character from moving in the z-direction
        GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezePositionZ;
    }