예제 #1
0
    void shoot()
    {
        //pointAtPlayer
        RaycastHit hit;

        Anim.SetFloat("lookDirection", Mathf.Lerp(Anim.GetFloat("lookDirection"), target() + targetOffset - targetOffset * (DistanceBetweenPlayerAndThis - attackRange) / DistanceBetweenPlayerAndThis, targetSmoother));
        moving = false;
        GunPlaceHolder.shoot();
    }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     move();
     point_at_mouse();
     //Debug.Log(verticalVelocity+" "+inAirtime);
     if (Input.GetAxis("Fire1") == 1)
     {
         isShooting = gunHolder.shoot();
     }
     else
     {
         isShooting = false;
     }
 }