示例#1
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }


        if (detected)
        {
            ActionCam.ActionBullet(2.0f);
            ActionCam.ObjectLookAt = null;
            ActionCam.SlowmotionNow(0.1f, 1.6f);
            ActionCam.Follow = false;
            ActionCam.SetPosition(ActionCam.transform.position, ActionCam.Detected);
            ActionCam.ResetFOV();
        }
        else
        {
            // in case of missed prediction of hit point.
            // action camera will try to get new position as close as hit point

            ActionCam.FOVTarget = 20;
            ActionCam.ActionBullet(2.0f);
            ActionCam.ObjectLookAt = null;
            ActionCam.SlowmotionNow(0.1f, 1.6f);
            ActionCam.Follow = false;
            ActionCam.SetPosition(point - bullet.transform.forward * 5 * ZoomMulti, false);
            ActionCam.lookAtPosition = point;
        }

        base.TargetHited(bullet, target, point);
    }
示例#2
0
 public override void Shoot(GameObject bullet)
 {
     if (!ActionCam)
     {
         return;
     }
     ActionCam.SetPosition(bullet.transform.position, false);
     base.Shoot(bullet);
 }
示例#3
0
 public override void Shoot(GameObject bullet)
 {
     if (!ActionCam)
     {
         return;
     }
     ActionCam.ObjectLookAt = null;
     ActionCam.FOVTarget    = 20;
     ActionCam.SetPosition(bullet.transform.position, false);
     base.Shoot(bullet);
 }
示例#4
0
 public override void Shoot(GameObject bullet)
 {
     if (!ActionCam)
     {
         return;
     }
     ActionCam.ObjectFollowing = null;
     ActionCam.ObjectLookAt    = null;
     ActionCam.InAction        = false;
     ActionCam.Follow          = false;
     ActionCam.SetPosition(bullet.transform.position, false);
     base.Shoot(bullet);
 }
示例#5
0
    public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }
        if (!ActionCam.InAction)
        {
            ActionCam.Follow = true;
            ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * 2 * ZoomMulti), false);
        }


        base.FirstDetected(bullet, target, point);
    }
示例#6
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.ActionBullet(3.0f);
        ActionCam.ObjectLookAt = null;
        ActionCam.SlowmotionNow(0.02f, 1.0f);
        ActionCam.Follow         = true;
        ActionCam.lookAtPosition = point;
        ActionCam.SetPosition(point + (target.transform.right * ZoomMulti) - (target.transform.forward * 2 * ZoomMulti), true);
        ActionCam.LengthMult = 0.5f;

        base.TargetHited(bullet, target, point);
    }
示例#7
0
    public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        if (!ActionCam.HitTarget)
        {
            ActionCam.ObjectLookAt = bullet.gameObject;
            ActionCam.Follow       = true;
            ActionCam.SlowmotionNow(0.02f, 3.0f);
            ActionCam.SetPosition(point + (target.transform.right * ActionCam.Length), false);
            ActionCam.ActionBullet(10.0f);
        }
        base.TargetDetected(bullet, target, point);
    }
示例#8
0
 public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
 {
     if (!ActionCam)
     {
         return;
     }
     if (!ActionCam.HitTarget)
     {
         ActionCam.Follow = true;
         ActionCam.ActionBullet(10.0f);
         ActionCam.Slowmotion(0.015f, 10f);
         ActionCam.LengthMult = 0.2f;
         ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected);
         ActionCam.CameraOffset = Vector3.right;
     }
     base.TargetDetected(bullet, target, point);
 }
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.SetPositionDistance(point, true);
        ActionCam.lookAtPosition = point;
        ActionCam.ActionBullet(2.0f);
        ActionCam.SlowmotionNow(0.03f, 1);
        ActionCam.SetFOV(20, true, 0.1f);
        ActionCam.ObjectFollowing = null;
        ActionCam.Follow          = true;
        ActionCam.SetPosition(point - bullet.transform.forward * 5, false);

        base.TargetHited(bullet, target, point);
    }
示例#10
0
    public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        if (!ActionCam.InAction)
        {
            ActionCam.ObjectLookAt = bullet.gameObject;
            ActionCam.Follow       = true;
            ActionCam.ActionBullet(10.0f);
            ActionCam.SlowmotionNow(0.025f, 3.0f);
            ActionCam.LengthMult = 0.2f;
            ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected);
            ActionCam.CameraOffset = -Vector3.right;
        }


        base.FirstDetected(bullet, target, point);
    }
示例#11
0
    public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        if (!ActionCam.InAction)
        {
            ActionCam.ObjectLookAt = bullet.gameObject;
            ActionCam.Follow       = true;
            ActionCam.ActionBullet(10.0f);
            //This is the method you wanna change when bullet is on it's path!
            ActionCam.SlowmotionNow(0.1f, 3.0f);
            ActionCam.LengthMult = 0.1f;
            ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right) - (bullet.transform.forward), ActionCam.Detected);
            ActionCam.CameraOffset = ((bullet.transform.right) - (bullet.transform.forward)) * 0.2f;
            detected = true;
        }


        base.FirstDetected(bullet, target, point);
    }