protected override void Start() { base.Start(); indexLength = System.Enum.GetValues(typeof(ammoModel)).Length - 1; currentAmmo = (ammoModel)curPos; swiMod = GetComponent <SwitchModel>(); SetModels(); }
public ammoModel LastPart() { ClearMods(); curPos--; if (curPos < 0) { curPos = indexLength - 1; } currentAmmo = (ammoModel)curPos; return(currentAmmo); }
public ammoModel NextPart() { ClearMods(); curPos++; if (curPos >= indexLength) { curPos = 0; } currentAmmo = (ammoModel)curPos; return(currentAmmo); }
public void RunStatMods(ammoModel ammo, GunStats stats) { switch (ammo) { case ammoModel.one: stats.fireRate += 2; stats.stability = 0; stats.damage += 1; stats.accuracy += 0; stats.durability += 0; stats.ammo += 4; stats.myElementA = element.acid; break; case ammoModel.two: stats.fireRate += 3; stats.stability = 0; stats.damage += 0; stats.accuracy += 0; stats.durability += 0; stats.ammo += 6; stats.myElementA = element.electric; break; case ammoModel.three: stats.fireRate += 0; stats.stability = 0; stats.damage += 3; stats.accuracy += 0; stats.durability += 0; stats.ammo += 3; stats.myElementA = element.fire; break; case ammoModel.four: stats.fireRate += 1; stats.stability = 0; stats.damage += 2; stats.accuracy += 0; stats.durability += 0; stats.ammo += 4; stats.myElementA = element.ice; break; case ammoModel.five: stats.fireRate += 4; stats.stability = 0; stats.damage += 2; stats.accuracy += 0; stats.durability += 0; stats.ammo += 7; stats.myElementA = element.plasma; break; case ammoModel.six: stats.fireRate += 2; stats.stability = 0; stats.damage += 4; stats.accuracy += 0; stats.durability += 0; stats.ammo += 5; stats.myElementA = element.subatomic; break; case ammoModel.seven: stats.fireRate += 3; stats.stability = 0; stats.damage += 3; stats.accuracy += 0; stats.durability += 0; stats.ammo += 6; stats.myElementA = element.nova; break; case ammoModel.eight: stats.fireRate += 5; stats.stability = 0; stats.damage += 5; stats.accuracy += 0; stats.durability += 0; stats.ammo += 4; stats.myElementA = element.hydro; break; case ammoModel.nine: stats.fireRate += 4; stats.stability = 0; stats.damage += 6; stats.accuracy += 0; stats.durability += 0; stats.ammo += 5; stats.myElementA = element.quantum; break; case ammoModel.ten: stats.fireRate += 6; stats.stability = 0; stats.damage += 4; stats.accuracy += 0; stats.durability += 0; stats.ammo += 7; stats.myElementA = element.mystic; break; case ammoModel.eleven: stats.fireRate += 6; stats.stability = 0; stats.damage += 6; stats.accuracy += 0; stats.durability += 0; stats.ammo += 7; stats.myElementA = element.nuclear; break; case ammoModel.none: break; default: break; } }