public ProtectiveHazard(Globals.protectiveHazardTypes protectiveHazardType) { switch (protectiveHazardType) { case Globals.protectiveHazardTypes.woodenCrate: ProtectiveHazard woodenCrate = new ProtectiveHazard("Wooden Crate", ProtectiveHazard.materials.woodenCrate, 10); this.copyProtectiveHazard(woodenCrate); break; case Globals.protectiveHazardTypes.metalCrate: ProtectiveHazard metalCrate = new ProtectiveHazard("Metal Crate", ProtectiveHazard.materials.metalCrate, 15); this.copyProtectiveHazard(metalCrate); break; case Globals.protectiveHazardTypes.safeOilDrum: ProtectiveHazard safeOilDrum = new ProtectiveHazard("Safe Oil Drum", ProtectiveHazard.materials.safeOilDrum, 5); this.copyProtectiveHazard(safeOilDrum); break; } }
public void copyProtectiveHazard(ProtectiveHazard original) { name = original.name; material = original.material; protectiveHazardHP = original.protectiveHazardHP; }
public ProtectiveHazard(ProtectiveHazard protectiveHazard) { name = protectiveHazard.name; material = protectiveHazard.material; protectiveHazardHP = protectiveHazard.protectiveHazardHP; }