public void checkAimRelease() { if (!isAiming) { return; } switch (currentAmmo.type) { case GauntletType.Zroot: ZRoot zRoot = currentAmmo.ammoObject.GetComponent <ZRoot> (); if (!zRoot.isShot() && !levController.isJumping) { setLockAim(false); } break; } }
public void shoot() { if (!isAiming || !levController.isGrounded || levController.isJumping || currentAmmo == null) { return; } levController.FacingDirectionInstant = levController.facingDirection; Vector3 aimDirection = Quaternion.AngleAxis(aimAngle, levController.transform.forward) * levController.transform.right; switch (currentAmmo.type) { case GauntletType.Zroot: ZRoot zRoot = currentAmmo.ammoObject.GetComponent <ZRoot> (); if (!zRoot.isShot()) { zRoot.shootZRoot(gauntletNozzle.position, aimDirection); levController.levAnimator.SetTrigger("isShooting"); setLockAim(true); } break; } }