Ejemplo n.º 1
0
    void Start()
    {
        pistols = Resources.LoadAll("Sprites/pistols");
        //weapons
        pistols = Resources.LoadAll("Sprites/pistols");
        Weapon EmptyWeapon = new Weapon(0, "Empty", 0, 0, null, 0, 0, 0, 0, 0, null, null, new Vector2(0, 0), 0f, 0f, null, null);

        Weapons.Add(EmptyWeapon);
        Weapon glock17 = new Weapon(1, "Glock 17", 0.0f, 50f, Resources.Load <Sprite>("Sprites/glock"), 0.35f, 0.25f, 25f, Mathf.Infinity, 17, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/glock17") as AudioClip, new Vector2(-0.028f, 0.604f), 2f, -2f, Resources.Load("Sounds/reload") as AudioClip, (Sprite)pistols[1]);

        Weapons.Add(glock17);
        Weapon DEagle = new Weapon(2, "Desert Eagle", 40f, 150f, Resources.Load <Sprite>("Sprites/de"), 0.4f, 1f, 1f, 100f, 9, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/de") as AudioClip, new Vector2(-0.028f, 0.604f), 6f, -6f, Resources.Load("Sounds/deagle_reload") as AudioClip, (Sprite)pistols[2]);

        Weapons.Add(DEagle);
        Weapon Kalashnikov = new Weapon(3, "AK 47", 100f, 350f, Resources.Load <Sprite>("Sprites/AK47"), 0.42f, 0.1f, 50f, 250, 30, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/ak47") as AudioClip, new Vector2(0.056f, 0.562f), 5f, -5f, Resources.Load("Sounds/AK47_reload") as AudioClip, Resources.Load <Sprite>("Sprites/ak48"));

        Weapons.Add(Kalashnikov);
        Weapon Barrett = new Weapon(4, "Barrett M82", 350f, 800f, Resources.Load <Sprite>("Sprites/barett"), 1f, 1.5f, 200f, 50, 5, Resources.Load("Prefabs/Barrett bullet") as GameObject, Resources.Load("Sounds/barrett") as AudioClip, new Vector2(0.06f, 0.65f), 0f, 0f, Resources.Load("Sounds/reload") as AudioClip, Resources.Load <Sprite>("Sprites/barrett"));

        Weapons.Add(Barrett);
        Weapon M416 = new Weapon(5, "M416", 200f, 400f, Resources.Load <Sprite>("Sprites/M416"), 0.55f, 0.086f, 40f, 150, 30, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/m416") as AudioClip, new Vector2(0.056f, 0.562f), 3f, -3f, Resources.Load("Sounds/m4_reload") as AudioClip, Resources.Load <Sprite>("Sprites/m417"));

        Weapons.Add(M416);
        Weapon AUG = new Weapon(6, "AUG", 300f, 600f, Resources.Load <Sprite>("Sprites/AUG"), 0.55f, 0.086f, 42f, 150, 40, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/aug") as AudioClip, new Vector2(0.056f, 0.562f), 1f, -1f, Resources.Load("Sounds/aug_reload") as AudioClip, Resources.Load <Sprite>("Sprites/aug 1"));

        Weapons.Add(AUG);
        Weapon SW17 = new Weapon(7, "S&W Model 17", 20f, 50f, Resources.Load <Sprite>("Sprites/SW17"), 0.4f, 0.7f, 20f, 100, 6, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/sw17_sound") as AudioClip, new Vector2(-0.028f, 0.604f), 1f, -1f, Resources.Load("Sounds/sw17_reload") as AudioClip, (Sprite)pistols[3]);

        Weapons.Add(SW17);
        Weapon P90 = new Weapon(8, "P90", 200f, 500f, Resources.Load <Sprite>("Sprites/P90"), 0.4f, 0.067f, 30f, 180, 50, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/p90_sound") as AudioClip, new Vector2(0.056f, 0.432f), 1f, -1f, Resources.Load("Sounds/p90_reload") as AudioClip, Resources.Load <Sprite>("Sprites/p91"));

        Weapons.Add(P90);
        Weapon SawedOff = new Weapon(9, "Sawed-off", 100, 250, Resources.Load <Sprite>("Sprites/sawed-off"), 0.25f, 0.8f, 20f, 50, 2, Resources.Load("Prefabs/shotgun bullet") as GameObject, Resources.Load("Sounds/sawed-off shot") as AudioClip, new Vector2(0.056f, 0.432f), 8, -8, Resources.Load("Sounds/sawed-off reload") as AudioClip, Resources.Load <Sprite>("Sprites/sawed-off1"));

        Weapons.Add(SawedOff);
        //items
        Passive nullpasive = new Passive(0, "Ass", Mathf.Infinity, 0, null);

        Passives.Add(nullpasive);
        AnotherHeart ah = new AnotherHeart(1, "AnotherHeart", 75, 125, Resources.Load <Sprite>("Sprites/HeartUp"));

        Passives.Add(ah);
        //bonusese
        bonus      zerobonus = new bonus(0, "ASs", 0, 0, null);
        RefillAmmo ammorefil = new RefillAmmo(1, "Ammo Refill", 0, 50, Resources.Load <Sprite>("Sprites/Ammorefil"));
        RefillHP   refillhp  = new RefillHP(2, "HP refill", 0, 75, Resources.Load <Sprite>("Sprites/fullhealth"));

        Bonuses.Add(zerobonus);
        Bonuses.Add(ammorefil);
        Bonuses.Add(refillhp);
        //actives
        UsableItem        nullusable = new UsableItem(0, "ASs", 0, 0, null, 0);
        airstrike         airstrike  = new airstrike(1, "Airstrike", 40, 120, Resources.Load <Sprite>("Sprites/airstrike"), 25);
        PortableBloodBank pbb        = new PortableBloodBank(2, "Portable blood bank", 25, 100, Resources.Load <Sprite>("Sprites/Piggy empty"), 0.1f);
        ammodrop          ad         = new ammodrop(3, "Ammo Delivery", 50, 200, Resources.Load <Sprite>("Sprites/ammodrop"), 25f);

        Usables.Add(nullusable);
        Usables.Add(airstrike);
        Usables.Add(pbb);
        Usables.Add(ad);
    }
Ejemplo n.º 2
0
    public void Initialize()
    {
        pistols = Resources.LoadAll("Sprites/pistols");
        //weapons
        pistols = Resources.LoadAll("Sprites/pistols");
        Weapon EmptyWeapon = new Weapon(0, "Empty", 0, 0, null, 0, 0, 0, 0, 0, null, null, new Vector2(0, 0), 0f, 0f, null, null);

        Weapons.Add(EmptyWeapon);
        Weapon glock17 = new Weapon(1, "Glock 17", 0.0f, 50f, Resources.Load <Sprite>("Sprites/glock"), 0.35f, 0.25f, 25f, Mathf.Infinity, 17, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/glock17") as AudioClip, new Vector2(-0.028f, 0.604f), 2f, -2f, Resources.Load("Sounds/reload") as AudioClip, (Sprite)pistols[1]);

        Weapons.Add(glock17);
        Weapon DEagle = new Weapon(2, "Desert Eagle", 40f, 150f, Resources.Load <Sprite>("Sprites/de"), 0.4f, 0.65f, 60f, 100f, 9, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/de") as AudioClip, new Vector2(-0.028f, 0.604f), 6f, -6f, Resources.Load("Sounds/deagle_reload") as AudioClip, (Sprite)pistols[2]);

        Weapons.Add(DEagle);
        Weapon Kalashnikov = new Weapon(3, "AK 47", 100f, 350f, Resources.Load <Sprite>("Sprites/AK47"), 0.42f, 0.1f, 50f, 250, 30, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/ak47") as AudioClip, new Vector2(0.056f, 0.562f), 5f, -5f, Resources.Load("Sounds/AK47_reload") as AudioClip, Resources.Load <Sprite>("Sprites/ak48"));

        Weapons.Add(Kalashnikov);
        Weapon Barrett = new Weapon(4, "Barrett M82", 350f, 800f, Resources.Load <Sprite>("Sprites/barett"), 1f, 1.5f, 200f, 50, 5, Resources.Load("Prefabs/Barrett bullet") as GameObject, Resources.Load("Sounds/barrett") as AudioClip, new Vector2(0.06f, 0.65f), 0f, 0f, Resources.Load("Sounds/reload") as AudioClip, Resources.Load <Sprite>("Sprites/barrett"));

        Weapons.Add(Barrett);
        Weapon M416 = new Weapon(5, "M416", 200f, 400f, Resources.Load <Sprite>("Sprites/M416"), 0.55f, 0.086f, 40f, 150, 30, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/m416") as AudioClip, new Vector2(0.056f, 0.562f), 3f, -3f, Resources.Load("Sounds/m4_reload") as AudioClip, Resources.Load <Sprite>("Sprites/m417"));

        Weapons.Add(M416);
        Weapon AUG = new Weapon(6, "AUG", 300f, 600f, Resources.Load <Sprite>("Sprites/AUG"), 0.55f, 0.086f, 42f, 150, 40, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/aug") as AudioClip, new Vector2(0.056f, 0.562f), 1f, -1f, Resources.Load("Sounds/aug_reload") as AudioClip, Resources.Load <Sprite>("Sprites/aug 1"));

        Weapons.Add(AUG);
        Weapon SW17 = new Weapon(7, "S&W Model 17", 20f, 50f, Resources.Load <Sprite>("Sprites/SW17"), 0.4f, 0.7f, 20f, 100, 6, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/sw17_sound") as AudioClip, new Vector2(-0.028f, 0.604f), 1f, -1f, Resources.Load("Sounds/sw17_reload") as AudioClip, (Sprite)pistols[3]);

        Weapons.Add(SW17);
        Weapon P90 = new Weapon(8, "P90", 200f, 500f, Resources.Load <Sprite>("Sprites/P90"), 0.4f, 0.067f, 45f, 180, 50, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/p90_sound") as AudioClip, new Vector2(0.056f, 0.432f), 1f, -1f, Resources.Load("Sounds/p90_reload") as AudioClip, Resources.Load <Sprite>("Sprites/p91"));

        Weapons.Add(P90);
        Weapon SawedOff = new Weapon(9, "Sawed-off", 100, 150f, Resources.Load <Sprite>("Sprites/sawed-off"), 0.25f, 0.8f, 40f, 50, 2, Resources.Load("Prefabs/shotgun bullet") as GameObject, Resources.Load("Sounds/sawed-off shot") as AudioClip, new Vector2(0.056f, 0.432f), 8, -8, Resources.Load("Sounds/sawed-off reload") as AudioClip, Resources.Load <Sprite>("Sprites/sawed-off1"));

        Weapons.Add(SawedOff);
        Weapon Groza = new Weapon(10, "Groza", 100, 600f, Resources.Load <Sprite>("Sprites/Groza"), 0.42f, 0.08f, 50f, 150, 40, Resources.Load("Prefabs/glock bullet") as GameObject, Resources.Load("Sounds/Groza") as AudioClip, new Vector2(0.056f, 0.432f), 4f, -4f, Resources.Load("Sounds/Groza_reload") as AudioClip, Resources.Load <Sprite>("Sprites/Groza1"));

        Weapons.Add(Groza);
        //TODO: ADD RELOAD SOUND AND SHOTPOINT
        Weapon EngineerGun = new Weapon(11, "Engineer Railgun", 100f, 550f, Resources.Load <Sprite>("Sprites/engineergun 1"), 10f, 0.8f, 40f, 100, 8, Resources.Load("Prefabs/engineer gun bullet") as GameObject, Resources.Load("Sounds/lasershot") as AudioClip, new Vector2(-0.306f, 0.451f), 0f, 0f, Resources.Load("Sounds/Groza_reload") as AudioClip, Resources.Load <Sprite>("Sprites/engineergun"));

        Weapons.Add(EngineerGun);
        //items
        Passive nullpasive = new Passive(0, "Ass", Mathf.Infinity, 0, null);

        Passives.Add(nullpasive);
        AnotherHeart          ah              = new AnotherHeart(1, "AnotherHeart", 75, 125, Resources.Load <Sprite>("Sprites/HeartUp"));
        Cake                  cake            = new Cake(2, "Mysterious Cake", 50, 75, Resources.Load <Sprite>("Sprites/Cake"));
        SuspiciousLookingMush slm             = new SuspiciousLookingMush(3, "Suspicious Looking Mushroom", 50, 75, Resources.Load <Sprite>("Sprites/Slm"));
        GPS_Navigation_System GPS             = new GPS_Navigation_System(4, "GPS navigation system", 50, 200, Resources.Load <Sprite>("Sprites/GPS"));
        VampireTouch          vamp            = new VampireTouch(5, "Vampiric Touch", 75, 130, Resources.Load <Sprite>("Sprites/Vamp"));
        Shield                shieldgenerator = new Shield(6, "Shield generator", 200, 400, Resources.Load <Sprite>("Sprites/shield generator"));
        Charger               charger         = new Charger(7, "Spacebar Charger", 200, 200, Resources.Load <Sprite>("Sprites/charger"));
        Balaclava             balaclava       = new Balaclava(8, "Balaclava", 1000, 300, Resources.Load <Sprite>("Sprites/Alex's balaclava"));
        Magnet                magnet          = new Magnet(9, "Small Magnet", 10f, 75f, Resources.Load <Sprite>("Sprites/magnet"));
        Discount              discount        = new Discount(10, "50% discount", 10f, 600f, Resources.Load <Sprite>("Sprites/discount"));

        Passives.Add(ah);
        Passives.Add(cake);
        Passives.Add(slm);
        Passives.Add(GPS);
        Passives.Add(vamp);
        Passives.Add(shieldgenerator);
        Passives.Add(charger);
        Passives.Add(balaclava);
        Passives.Add(magnet);
        Passives.Add(discount);
        //bonusese
        bonus      zerobonus = new bonus(0, "ASs", 0, 0, null);
        RefillAmmo ammorefil = new RefillAmmo(1, "Ammo Refill", 0, 50, Resources.Load <Sprite>("Sprites/Ammorefil"));
        RefillHP   refillhp  = new RefillHP(2, "HP refill", 0, 75, Resources.Load <Sprite>("Sprites/fullhealth"));

        Bonuses.Add(zerobonus);
        Bonuses.Add(ammorefil);
        Bonuses.Add(refillhp);
        //actives
        UsableItem        nullusable = new UsableItem(0, "ASs", 0, 0, null, 0);
        airstrike         airstrike  = new airstrike(1, "Airstrike", 40, 120, Resources.Load <Sprite>("Sprites/airstrike"), 25);
        PortableBloodBank pbb        = new PortableBloodBank(2, "Portable blood bank", 25, 100, Resources.Load <Sprite>("Sprites/Piggy empty"), 0.1f);
        ammodrop          ad         = new ammodrop(3, "Ammo Delivery", 50, 200, Resources.Load <Sprite>("Sprites/ammodrop"), 25f);
        BerserkerRage     br         = new BerserkerRage(4, "Berserker's Rage", 50, 250, Resources.Load <Sprite>("Sprites/berserker's  rage"), 30);

        Usables.Add(nullusable);
        Usables.Add(airstrike);
        Usables.Add(pbb);
        Usables.Add(ad);
        Usables.Add(br);
    }