public static Texture2D ImageAssociation(ammoType ammo) { switch (ammo) { case ammoType.primitive: return(Primitive); case ammoType.preindustrial: return(PreIndustrial); case ammoType.industrial: return(Industrial); case ammoType.chemical: return(Chemical); case ammoType.acid: return(Acid); case ammoType.nitrogen: return(Nitrogen); case ammoType.battery: return(Battery); } return(Widgets.CheckboxOffTex); }
public static ThingDef AmmunitionFinder(ammoType ammo) { switch (ammo) { case ammoType.primitive: return(ThingDefOf.PrimitiveAmmunitionCase); case ammoType.preindustrial: return(ThingDefOf.PreIndustrialAmmunitionCase); case ammoType.industrial: return(ThingDefOf.IndustrialAmmunitionCase); case ammoType.chemical: return(ThingDefOf.ChemicalAmmunitionCanister); case ammoType.acid: return(ThingDefOf.AcidAmmunitionCanister); case ammoType.nitrogen: return(ThingDefOf.NitrogenAmmunitionCanister); case ammoType.battery: return(ThingDefOf.BatteryAmmunitionCharge); } return(null); }
public MainWeapon(ammoType theAmmo) { ammo = theAmmo; switch (ammo) { case ammoType.vegetable: damage = 20; range = 7.5f; dischargeRate = 15.0f; rechargeRate = 8.0f; break; case ammoType.smoothie: damage = 5; range = 15.0f; dischargeRate = 10.5f; rechargeRate = 8.0f; break; case ammoType.lemonade: damage = 2; range = 25.0f; dischargeRate = 2.5f; rechargeRate = 8.0f; break; } }
public void ChangeAmmoType(ammoType aType) { totalMaxAmmo [ammo] = maxAmmo; totalCurrentAmmo [ammo] = currentAmmo; ammo = aType; foreach(GameObject obj in allbullets) { if(obj.name == "ammo_" + ammo.ToString()) { ShootingManager.Instance.SetCurrentBullets (obj ); ShootingManager.Instance.SetCurrentBulletInfo( obj.GetComponent<BulletInfo>()); maxAmmo = totalMaxAmmo [ammo]; currentAmmo = totalCurrentAmmo[ammo]; UpdateUI.Ammo.UpdateBar (currentAmmo, maxAmmo); } } }
// Use this for initialization void Start() { at = (ammoType)Random.Range(0, 4); switch (at) { case ammoType.laser: display.sprite = laser; break; case ammoType.rocket: display.sprite = rocket; break; case ammoType.nade: display.sprite = nade; break; case ammoType.chain: display.sprite = chain; break; } }
public void fillRandom() { ammoType at = (ammoType)Random.Range(0, 4); switch (at) { case ammoType.laser: GetComponent <Laser>().ammo = 1000; break; case ammoType.rocket: GetComponent <Rocket>().ammo += 1000; break; case ammoType.nade: GetComponent <GrenadeLauncher>().ammo += 1000; break; case ammoType.chain: GetComponent <ChainGun>().ammo += 1000; break; } }
public Player(ammoType theAmmoType, bombType theBombtype) { blenderBlaster = new MainWeapon(theAmmoType); omNomBomb = new SubWeapon(theBombtype); }
private string ConvertAmmoTypeToString(ammoType ammo) { if (ammo == ammoType.a_32_ACP) { return(".32 ACP"); } else if (ammo == ammoType.a_357_Magnum) { return(".357 Magnum"); } else if (ammo == ammoType.a_38_Special) { return(".38 Special"); } else if (ammo == ammoType.a_44_Magnum) { return(".44 Magnum"); } else if (ammo == ammoType.a_45_ACP) { return(".45 ACP"); } else if (ammo == ammoType.a_50AE) { return(".50 AE"); } else if (ammo == ammoType.a_50BMG) { return(".50 BMG"); } else if (ammo == ammoType.a_12_Gauge) { return("12 Gauge"); } else if (ammo == ammoType.a_20_Gauge) { return("20 Gauge"); } else if (ammo == ammoType.a_5_45x39mm) { return("5.45x39mm"); } else if (ammo == ammoType.a_5_56x45mm) { return("5.56x45mm"); } else if (ammo == ammoType.a_7_62x25mmTokarev) { return("7.62x25mm Tokarev"); } else if (ammo == ammoType.a_7_62x39mm) { return("7.62x39mm"); } else if (ammo == ammoType.a_7_62x51mm) { return("7.62x51mm"); } else if (ammo == ammoType.a_7_62x54mmR) { return("7.62x54mmR"); } else if (ammo == ammoType.a_9x19mmParabellum) { return("9x19mm Parabellum"); } else { return("unknown"); } }
public void changeAmmo(int numChange) { thisType = numChange; }