示例#1
0
 public void ResetZone()
 {
     if (hoverDelayer != null)
     {
         hoverDelayer.Kill();
         hoverDelayer = null;
     }
     base.OnEndHover();
     baseCard.ResetPreview();
     dropPoint.gameObject.SetActive(false);
 }
示例#2
0
 public void CloseZone()
 {
     open = false;
     if (hoverDelayer != null)
     {
         hoverDelayer.Kill();
         hoverDelayer = null;
     }
     building.ResetPreview();
     dropPoint.gameObject.SetActive(false);
 }
示例#3
0
 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);
 }
示例#4
0
 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));
 }
示例#5
0
 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();
     }
 }