void Start() { player = GameObject.Find("Player"); mscr = player.GetComponent <MoveScript>(); gamemanager = GameObject.Find("GameManager"); itemList = gamemanager.GetComponent <ItemScript>(); //making items in shop random by taking them from the list weaponAvail = itemList.Weapons[Random.Range(1, itemList.Weapons.Count)]; passiveAvail = itemList.Passives[Random.Range(1, itemList.Passives.Count)]; usableAvail = itemList.Usables[Random.Range(1, itemList.Usables.Count)]; bonusAvail = itemList.Bonuses[Random.Range(1, itemList.Bonuses.Count)]; // //just for indication ;) bonusname = bonusAvail.Name; usablename = usableAvail.Name; passivename = passiveAvail.Name; weaponame = weaponAvail.Name; if (weaponAvail == mscr.primary || weaponAvail == mscr.secondary) { while (weaponAvail == mscr.primary || weaponAvail == mscr.secondary) { weaponAvail = itemList.Weapons[Random.Range(1, itemList.Weapons.Count)]; } } if (usableAvail == mscr.activeusable) { while (usableAvail == mscr.activeusable) { usableAvail = itemList.Usables[Random.Range(1, itemList.Usables.Count)]; } } for (int x = 0; x < itemontable.Length; x++) { //display sprites GameObject placeholder; placeholder = itemontable[x]; if (wep == false) { placeholder.GetComponent <SpriteRenderer>().sprite = weaponAvail.Shopsprite; wep = true; } else if (pass == false) { placeholder.GetComponent <SpriteRenderer>().sprite = passiveAvail.Shopsprite; pass = true; } else if (use == false) { placeholder.GetComponent <SpriteRenderer>().sprite = usableAvail.Shopsprite; use = true; } else if (bonus == false) { placeholder.GetComponent <SpriteRenderer>().sprite = bonusAvail.Shopsprite; bonus = true; } } }
private void timer_spawn_timeout() { difficulty_coef = lvl.get_difficulty(); //ganerate random bonus object bonus bonus_object = (bonus)bonus_1.Instance(); AddChild(bonus_object); // random pos random_gen.Randomize(); float pos_x = random_gen.Randi() % game_field_width; pos_x = (pos_x >= 0) ? pos_x : pos_x * (-1); float pos_y = random_gen.Randi() % game_field_height; pos_y = (pos_y >= 0) ? pos_y : pos_y * (-1); bonus_object.Position = new Vector2(pos_x, pos_y); //random velocity float speed_x = random_gen.Randi() % (50 + difficulty_coef); float speed_y = random_gen.Randi() % (50 + difficulty_coef); int direction_x = (int)random_gen.Randi() % 2; int direction_y = (int)random_gen.Randi() % 2; Vector2 velocity = new Vector2(speed_x * direction_x, speed_y * direction_y); bonus_object.set_velocity_bonus(velocity); //random score int score = (int)random_gen.Randi() % 6; score = (score < 0) ? (score * -1) + 2 : score + 2; bonus_object.set_score_bonus(score); }
internal static Bonus getBonus(bonus b, Point p) { MyAttribute local = getAtribute(b); Bonus r = new Bonus(p, local.tag); return(r); }
private void pictureBox8_Click(object sender, EventArgs e) { try { bonus cl = new bonus(); cl.DataSource = StormSoft.classe.glossaire.GetInstance().sortieBonus(); ReportPrintTool printTool = new ReportPrintTool(cl); printTool.ShowPreviewDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Start() { int rand = Random.Range(0, 3); if(rand == 0) { currentBonus = bonus.attaque; } else if (rand == 1) { currentBonus = bonus.shield; } else if (rand == 2) { currentBonus = bonus.piege; } }
public AfterLevelBonus(bonus b) { this.name = "Placeholder"; this.scoreBonus = 0; this.imagePath = "Nah"; switch (b) { case bonus.FC: this.name = "Full Combo"; this.imagePath = "LootSaber.UI.BonusIcons.FC.png"; this.scoreBonus = 1000; break; case bonus.SSS: this.name = "HOW"; this.imagePath = "LootSaber.UI.BonusIcons.SSS.png"; this.scoreBonus = 50000; break; case bonus.SS: this.name = "SS Rank"; this.imagePath = "LootSaber.UI.BonusIcons.SS.png"; this.scoreBonus = 500; break; case bonus.S: this.name = "S Rank"; this.imagePath = "LootSaber.UI.BonusIcons.S.png"; this.scoreBonus = 250; break; case bonus.PB: this.name = "Personal Best"; this.imagePath = "LootSaber.UI.BonusIcons.PB.png"; this.scoreBonus = 2000; break; case bonus.YT: this.name = "You Tried"; this.imagePath = "LootSaber.UI.BonusIcons.YT.png"; this.scoreBonus = 69; break; } }
public int Del(bonus t) { return(dao.Del(t)); }
public int Change(bonus t) { return(dao.Change(t)); }
public int Add(bonus t) { return(dao.Add(t)); }
public bool Add(bonus us) { return(ist.Add(us)); }
static MyAttribute getAtribute(bonus b) { return((MyAttribute)Attribute.GetCustomAttribute( typeof(bonus).GetField(Enum.GetName(typeof(bonus), b)), typeof(MyAttribute))); }
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); }
void Update() { if (weaponAvail != null && itemontable[0] != null) { distancewep = itemontable[0].transform.position - player.transform.position; } else { distancewep = new Vector2(10000, 10000); } if (passiveAvail != null && itemontable[1] != null) { distancepass = itemontable[1].transform.position - player.transform.position; } else { distancepass = new Vector2(10000, 10000); } if (usableAvail != null && itemontable[2] != null) { distanceuse = itemontable[2].transform.position - player.transform.position; } else { distanceuse = new Vector2(10000, 10000); } if (bonusAvail != null && itemontable[3] != null) { distancebonus = itemontable[3].transform.position - player.transform.position; } else { distancebonus = new Vector2(10000, 10000); } vectorlenghts = new float[4] { distancewep.magnitude, distancepass.magnitude, distanceuse.magnitude, distancebonus.magnitude }; //check if player is in range to shop distancefromplayer = this.transform.position - player.transform.position; if (distancefromplayer.magnitude <= 5) { abletoshop = true; } else { abletoshop = false; } if (abletoshop == true) { ShopCanvas.SetActive(true); Animator anim; if (vectorlenghts[0] < vectorlenghts[1] && vectorlenghts[0] < vectorlenghts[2] && vectorlenghts[0] < vectorlenghts[3]) { if (itemontable[0] != null) { anim = itemontable[0].GetComponent <Animator>(); anim.SetBool("ItemActive", true); mscr.iteminrangeshop = weaponAvail; if (itemontable[1] != null) { itemontable[1].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[2] != null) { itemontable[2].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[3] != null) { itemontable[3].GetComponent <Animator>().SetBool("ItemActive", false); } } } else if (vectorlenghts[1] < vectorlenghts[0] && vectorlenghts[1] < vectorlenghts[2] && vectorlenghts[1] < vectorlenghts[3]) { if (itemontable[1] != null) { anim = itemontable[1].GetComponent <Animator>(); anim.SetBool("ItemActive", true); mscr.iteminrangeshop = passiveAvail; if (itemontable[0] != null) { itemontable[0].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[2] != null) { itemontable[2].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[3] != null) { itemontable[3].GetComponent <Animator>().SetBool("ItemActive", false); } } } else if (vectorlenghts[2] < vectorlenghts[1] && vectorlenghts[2] < vectorlenghts[0] && vectorlenghts[2] < vectorlenghts[3]) { if (itemontable[2] != null) { anim = itemontable[2].GetComponent <Animator>(); anim.SetBool("ItemActive", true); mscr.iteminrangeshop = usableAvail; if (itemontable[1] != null) { itemontable[1].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[0] != null) { itemontable[0].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[3] != null) { itemontable[3].GetComponent <Animator>().SetBool("ItemActive", false); } } } else if (vectorlenghts[3] < vectorlenghts[1] && vectorlenghts[3] < vectorlenghts[2] && vectorlenghts[3] < vectorlenghts[0]) { if (itemontable[3] != null) { anim = itemontable[3].GetComponent <Animator>(); anim.SetBool("ItemActive", true); mscr.iteminrangeshop = bonusAvail; if (itemontable[1] != null) { itemontable[1].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[2] != null) { itemontable[2].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[0] != null) { itemontable[0].GetComponent <Animator>().SetBool("ItemActive", false); } } } if (mscr.iteminrangeshop != null) { itemtext.text = mscr.iteminrangeshop.Name; if (!mscr.hasDiscount) { costText.text = mscr.iteminrangeshop.BuyValue.ToString() + "$"; } else { costText.text = Mathf.CeilToInt(mscr.iteminrangeshop.BuyValue / 2).ToString() + "$"; } if (mscr.iteminrangeshop.Type == "Weapon") { Weapon placehold = mscr.iteminrangeshop as Weapon; DPSText.text = (Mathf.FloorToInt(placehold.Damage * (1 / placehold.RateOfFire))).ToString() + "DPS"; } else { DPSText.text = ""; } } else { itemtext.text = ""; } if (mscr.iteminrangeshop != null) { if (mscr.money >= mscr.iteminrangeshop.BuyValue || (mscr.hasDiscount && mscr.money >= mscr.iteminrangeshop.BuyValue / 2)) { affordtext.text = "Press 'E' to buy: " + mscr.iteminrangeshop.Name; if (Input.GetKeyDown(KeyCode.E) && player.GetComponent <MoveScript>().dialogueon == false) { mscr.iteminrangeshop.OnBuy(); if (mscr.iteminrangeshop.Type != "Weapon" && mscr.secondary == null) { mscr.secondary = null; } player.GetComponent <MoveScript>().srctwo.PlayOneShot(kaching); foreach (GameObject gobject in itemontable) { if (gobject != null) { if (gobject.GetComponent <SpriteRenderer>().sprite == mscr.iteminrangeshop.Shopsprite) { if (weaponAvail != null) { if (weaponAvail.Shopsprite == gobject.GetComponent <SpriteRenderer>().sprite) { weaponAvail = null; } } else if (passiveAvail != null) { if (passiveAvail.Shopsprite == gobject.GetComponent <SpriteRenderer>().sprite) { passiveAvail = null; } } else if (usableAvail != null) { if (usableAvail.Shopsprite == gobject.GetComponent <SpriteRenderer>().sprite) { usableAvail = null; } } else if (bonusAvail != null) { if (bonusAvail.Shopsprite == gobject.GetComponent <SpriteRenderer>().sprite) { bonusAvail = null; } } mscr.iteminrangeshop = null; Destroy(gobject); break; } } } } } else if (mscr.money < mscr.iteminrangeshop.BuyValue) { if (mscr.iteminrangeshop != null) { affordtext.text = "You can't afford: " + mscr.iteminrangeshop.Name; } } } else { affordtext.text = ""; } } else { ShopCanvas.SetActive(false); if (itemontable[0] != null) { itemontable[0].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[1] != null) { itemontable[1].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[2] != null) { itemontable[2].GetComponent <Animator>().SetBool("ItemActive", false); } if (itemontable[3] != null) { itemontable[3].GetComponent <Animator>().SetBool("ItemActive", false); } } /* if(distancebonus.magnitude+distancepass.magnitude+distanceuse.magnitude+distancewep.magnitude >= 8000) * { * ShopCanvas.SetActive(false); * }*/ }
public bonus SelectOne(bonus us) { return(ist.SelectBy(e => e.bon_id == us.bon_id)[0]); }
public bool Upd(bonus us) { return(ist.Upd(us)); }
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); }
public bool Del(bonus us) { return(ist.Del(us)); }