Exemple #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);
    }
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        if (ActionCam.Detected)
        {
            ActionCam.ObjectLookAt = null;
            ActionCam.ActionBullet(3.0f);
            ActionCam.Follow = false;
        }
        else
        {
            ActionCam.ActionBullet(2.0f);
            ActionCam.ObjectLookAt = null;
            ActionCam.SlowmotionNow(0.1f, 1.6f);
            ActionCam.Follow         = false;
            ActionCam.lookAtPosition = point;
            ActionCam.SetPositionDistance(point, true);
        }

        base.TargetHited(bullet, target, point);
    }
 public override void Shoot(GameObject bullet)
 {
     if (!ActionCam)
     {
         return;
     }
     ActionCam.SetPosition(bullet.transform.position, false);
     base.Shoot(bullet);
 }
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.SlowmotionNow(0.1f, 1);
        base.TargetHited(bullet, target, point);
    }
 public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
 {
     if (!ActionCam)
     {
         return;
     }
     if (!ActionCam.Detected)
     {
         ActionCam.SetPositionDistance(target.transform.position, false);
     }
 }
Exemple #6
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.ClearTarget();
        ActionCam.ResetFOV();
        base.TargetHited(bullet, target, point);
    }
Exemple #7
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);
 }
 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);
 }
Exemple #9
0
    public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }
        if (!ActionCam.InAction)
        {
            ActionCam.Slowmotion(0.5f, 1);
        }


        base.FirstDetected(bullet, target, point);
    }
Exemple #10
0
 public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
 {
     if (!ActionCam)
     {
         return;
     }
     if (!ActionCam.Detected)
     {
         ActionCam.SetPositionDistance(target.transform.position, false);
     }
     ActionCam.ObjectFollowing = null;
     ActionCam.Follow          = false;
     ActionCam.ObjectLookAt    = null;
     base.TargetHited(bullet, target, point);
 }
    public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.ObjectLookAt = target.gameObject;
        ActionCam.Follow       = false;
        ActionCam.Slowmotion(0.2f, 0.2f);
        ActionCam.SetPositionDistance(target.transform.position, false);
        ActionCam.ActionBullet(2.0f);
        Debug.Log(">>>" + ActionCam.ObjectLookAt);
        base.TargetDetected(bullet, target, point);
    }
    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);
    }
Exemple #13
0
    public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }

        ActionCam.lookAtPosition = point;
        ActionCam.Follow         = false;
        ActionCam.SlowmotionNow(0.02f, 3);
        ActionCam.SetPositionDistance(point, false);
        ActionCam.ActionBullet(10.0f);
        ActionCam.SetFOV(10, true, 0.1f);
        base.TargetDetected(bullet, target, point);
    }
Exemple #14
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 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);
    }
    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);
    }
Exemple #17
0
    public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point)
    {
        if (!ActionCam)
        {
            return;
        }
        if (!ActionCam.Detected)
        {
            ActionCam.SetPositionDistance(point, false);
        }
        ActionCam.ActionBullet(3.0f);
        ActionCam.SlowmotionNow(0.01f, 3);

        ActionCam.ObjectFollowing = null;
        ActionCam.Follow          = false;
        ActionCam.ObjectLookAt    = null;
        base.TargetHited(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);
    }
Exemple #19
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);
    }
Exemple #20
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);
    }