public GameObject GetWeaponThatIs(WeaponsTypes type) { switch (type) { case WeaponsTypes.Nokia: return(GetWeaponThat(w => w is Nokia)); case WeaponsTypes.Tentacle: return(GetWeaponThat(w => w is Tentacle)); case WeaponsTypes.Toaster: return(GetWeaponThat(w => w is Toaster)); case WeaponsTypes.PenguinLauncher: return(GetWeaponThat(w => w is PenguinLauncher)); case WeaponsTypes.Fork: return(GetWeaponThat(w => w is Fork)); case WeaponsTypes.Palcat: return(GetWeaponThat(w => w is Palcat)); default: throw new NotImplementedException(); } }
public static void SetWeapon(WeaponsTypes wt, int playerNum) { if (swap) { playerNum = playerNum * (-1) + 1; } if (playerNum == 0) { WeaponPlayer0 = wt; } else if (playerNum == 1) { WeaponPlayer1 = wt; } else { throw new NotImplementedException(); } }