Ejemplo n.º 1
0
    public float shell_miss_rate = 0.2f; //Shell doesn't fire.

    // Looking for 33 DPS. this gun holds 4 rounds 30 damage a piece = 120 / 3s =  40. Also, it jams.
    public override Gun spawn(float rarity)
    {
        ShortyShotgun s = new ShortyShotgun();

        s.capacity   = 4 + (int)(rarity * 5); //up to 10 extra bullets
        s.reloadtime = s.capacity;
        s.spread     = 25 - (UnityEngine.Random.Range(0f, 30 * rarity));
        s.burst_size = 4 + (int)(rarity * 2);
        return(s);
    }
Ejemplo n.º 2
0
    public void addGuns()
    {
        for (int i = 0; i != ((dim_ * dim_) / 1000); ++i)
        {
            Gun g = null;
            switch (Random.Range(0, 4))
            {
            case 0: g = new Musket().spawn(0); break;

            case 1: g = new Revolver().spawn(0); break;

            case 2: g = new M1911().spawn(0);  break;

            case 3: g = new ShortyShotgun().spawn(0); break;
            }

            tiles_[Random.Range(0, dim_), Random.Range(0, dim_)] = new GroundGun(g);
        }
    }