public void OnPointerDown(PointerEventData pointer) { if (knight.grounded) { dJump = false; } if (knight.grounded && !knight.isDead) { knight.jumping(); IsPressed(); } if (!dJump && !knight.grounded && !knight.isDead) { knight.jumping(); dJump = true; IsPressed(); } }
public void jumping() { knight.jumping(); }