예제 #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Mouse1) && !Aiming)
     {
         Aiming = true;
         animControl.StartAiming();
         invoker.Invoke(.25f, SetLineActiveIfAiming);
         canShoot = false;
         invoker.Invoke(.25f, () => canShoot = true);
     }
     else if (Input.GetKeyUp(KeyCode.Mouse1) && Aiming)
     {
         Aiming = false;
         animControl.StopAiming();
         line.SetActive(false);
     }
     else if (Input.GetKeyDown(KeyCode.Mouse0) && canShoot && Aiming)
     {
         canShoot = false;
         invoker.Invoke(.6f, () => canShoot = true);
         Shoot();
     }
 }