void Awake ()
	{
		// Set up the references.
		behaviours = new List<GenericBehaviour> ();
		overridingBehaviours = new List<GenericBehaviour>();
		anim = GetComponent<Animator> ();
		hFloat = Animator.StringToHash("H");
		vFloat = Animator.StringToHash("V");
		camScript = playerCamera.GetComponent<ThirdPersonOrbitCamBasic> ();
		rBody = GetComponent<Rigidbody> ();

		// Grounded verification variables.
		groundedBool = Animator.StringToHash("Grounded");
		colExtents = GetComponent<Collider>().bounds.extents;
	}
Ejemplo n.º 2
0
    void Awake()
    {
        // Set up the references.
        behaviours           = new List <GenericBehaviour> ();
        overridingBehaviours = new List <GenericBehaviour>();
        anim      = GetComponent <Animator> ();
        hFloat    = Animator.StringToHash("H");
        vFloat    = Animator.StringToHash("V");
        camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic> ();
        rBody     = GetComponent <Rigidbody> ();

        // Grounded verification variables.
        groundedBool = Animator.StringToHash("Grounded");
        colExtents   = GetComponent <Collider>().bounds.extents;

        Cursor.SetCursor(crosshair, hotSpot, CursorMode.ForceSoftware);
        Cursor.lockState = CursorLockMode.Locked;
    }
Ejemplo n.º 3
0
    void Awake()
    {
        playerCamera = Camera.main.transform;


        // Set up the references.
        behaviours           = new List <GenericBehaviour>();
        overridingBehaviours = new List <GenericBehaviour>();

        hFloat    = Animator.StringToHash("H");
        vFloat    = Animator.StringToHash("V");
        camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic>();

        camScript.Setup(this.transform);

        rBody = GetComponent <Rigidbody>();

        unityAnim = GetComponent <Animator>();
    }
Ejemplo n.º 4
0
    void Start()
    {
        // Set up the references.
        behaviours           = new List <GenericBehaviour> ();
        overridingBehaviours = new List <GenericBehaviour>();
        anim      = GetComponent <Animator> ();
        hFloat    = Animator.StringToHash("H");
        vFloat    = Animator.StringToHash("V");
        camScript = playerCamera.GetComponent <ThirdPersonOrbitCamBasic> ();
        rBody     = GetComponent <Rigidbody> ();


        // Grounded verification variables.
        groundedBool = Animator.StringToHash("Grounded");
        colExtents   = GetComponent <Collider>().bounds.extents;

        //LeftJoy
        PlayerInputManager.getins().LeftJoy += Joy;
        //PlayerInputManager.getins().OnLeftJoyUp += LeftJoyUp;
    }
        public override void Init(bool isOwner)
        {
            _isOwner     = isOwner;
            unityAnim    = GetComponent <Animator>();
            hFloat       = Animator.StringToHash("H");
            vFloat       = Animator.StringToHash("V");
            groundedBool = Animator.StringToHash("Grounded");
            jumpBool     = Animator.StringToHash("Jump");
            speedFloat   = Animator.StringToHash("Speed");
            colExtents   = GetComponent <Collider>().bounds.extents;
            if (_isOwner)
            {
                playerCamera = Camera.main.transform;
                rBody        = GetComponent <Rigidbody>();
                camScript    = playerCamera.GetComponent <ThirdPersonOrbitCamBasic>();

                camScript.Setup(this.transform);
            }

            _initialized = true;
        }
Ejemplo n.º 6
0
 void Start()
 {
     refScript   = GetComponentInChildren <ThirdPersonOrbitCamBasic>();
     camOffset   = refScript.camOffset;
     pivotOffset = refScript.pivotOffset;
 }