public void ResetZone() { if (hoverDelayer != null) { hoverDelayer.Kill(); hoverDelayer = null; } base.OnEndHover(); baseCard.ResetPreview(); dropPoint.gameObject.SetActive(false); }
public void CloseZone() { open = false; if (hoverDelayer != null) { hoverDelayer.Kill(); hoverDelayer = null; } building.ResetPreview(); dropPoint.gameObject.SetActive(false); }
public void Shot() { aiming = true; shotReady = false; Aim(); InstancedAction.DelayAction(() => shotReady = true, 1 / gun.gun.fireRate); if (holsterTime != null) { holsterTime.Kill(); } gunAnim.SetTrigger("Shot"); Instantiate(gun.gun.bullet, gunPoint.position, gunPoint.rotation); holsterTime = InstancedAction.DelayAction(() => { aiming = false; AimOff(); }, aimingTime); }
public void Trigger() { if (!setup) { return; } setup = false; if (delayer != null) { delayer.Kill(); } foreach (var p in driftParticles.particles) { p.Stop(); } boostParticle.Play(); StartCoroutine(KartModifier(kart, duration)); }
private void Update() { CheckGround(); if (dashing) { if (Input.GetKeyDown(KeyCode.Space)) { dashTimer.Kill(); dashing = false; isDashing = false; movement.x /= 5; Jump(); } return; } Move(); if (Input.GetKeyDown(KeyCode.Space)) { Jump(); } if (Input.GetKeyDown(KeyCode.Mouse1)) { Dash(); } if (Input.GetKeyDown(KeyCode.Mouse0)) { if (shotReady && gun.ready) { Shot(); } } if (Input.GetKeyDown(KeyCode.Q)) { if (gun.ready) { GunThrow(); } } if (aiming) { Aim(); } }