void Start() { _spaceCollisionsController = GetComponent <SpaceCollisionsController>(); gravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2); maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; SetDirectionalInput(Vector3.right * RightSpeed); }
public void SetTarget(GameObject targetGo) { Target = targetGo.GetComponentInChildren <SpaceCollisionsController>(); focusArea = new FocusArea(Target.boxCollider.bounds, FocusAreaSize); _camera.orthographicSize = Zoom; }