public BasicLand(Rigidbody2D newThisObject, BasicJump newJump, BasicClimb newClimb, int newHoldingMaximumTime = 0, bool newCanJump = true, bool newCanClimb = false) { thisObject = newThisObject; jump = newJump; climb = newClimb; holdingMaximumTime = newHoldingMaximumTime; landTimer = holdingMaximumTime; canHold = holdingMaximumTime != 0; canJump = newCanJump; canClimb = newCanClimb; }
private void Start() { if (JumpComponent == null) { JumpComponent = GetComponent <BasicJump>(); } if (Motion2d == null) { Motion2d = GetComponent <Motion2d>(); } JumpComponent.OnLanding += OnLanding; Motion2d.OnJump += OnJump; }