void SetEdgesByGravityDirection() { if(_collisionController != null) { _edge = _collisionController.GetEdges(); _obstacleInfo = _collisionController.GetObstacleInfo(); } }
void Update() { if(_isOn) { _edge = GetComponent<CollisionController>().GetEdges(); _obstacleInfo = GetComponent<CollisionController>().GetObstacleInfo(); SetJumpingDirectionsFromGravity(); Jumping(); _lastPosition = new Vector3(transform.position.x, transform.position.y, transform.position.z); } Debug.Log("Jumping updated"); }
void MovementControl() { _edge = _collisionController.GetEdges(); _obstacleInfo = _collisionController.GetObstacleInfo(); GetInput(); //CheckCollisions(); ApplyChanges(); }