Пример #1
0
	// Use this for initialization
	void Awake () {
		playerGravity = gameObject.GetComponent<GravityTest>();

		thisRigidbody = GetComponent<Rigidbody>();
		colliderHeight = GetComponent<CapsuleCollider>().height * transform.localScale.y;
		colliderRadius = GetComponent<CapsuleCollider>().radius * transform.localScale.x;
	}
Пример #2
0
	void Awake() {
		playerTransform = transform.parent;
		playerGravity = playerTransform.GetComponent<GravityTest>();

		//Hide the mouse and lock it to the screen
		Cursor.lockState = CursorLockMode.Locked;
		Cursor.visible = false;

		//the player is not currently flipping
		flipping = false;
		pPositiveY = false;
	}