Example #1
0
    public Missile Fire()
    {
        if (timeSinceLastFire < fireRate)
        {
            return(null);
        }

        timeSinceLastFire = 0f;
        Missile copy = Instantiate(bullet);

        copy.transform.position = transform.position;
        copy.transform.rotation = transform.rotation;
        shakeSettings.Shake();
        onFire.Invoke();
        return(copy);
    }
Example #2
0
 public void Shake()
 {
     settings.Shake();
 }