Exemplo n.º 1
0
    private void Fire()
    {
        currentClip--;
        Vector3 forward = Quaternion.AngleAxis(Random.Range(-stats.GetAccuracy(), stats.GetAccuracy()), transform.up) * transform.forward;

        forward = Quaternion.AngleAxis(Random.Range(-stats.GetAccuracy(), stats.GetAccuracy()), transform.right) * forward;
        pool.GetFreeBullet().Initialize(transform, transform.forward, stats.GetSpeed(), stats.GetDamage());
        cdTimer = 0.0f;
    }