public Facility(FacilityType facType, float x, float y, float z, float hp, float ex, float ey, float ez) { this.name = facType.getName(); this.level = 0; this.x = x; this.y = y; this.z = z; this.ex = ex; this.ey = ey; this.ez = ez; this.hp = hp; this.facType = facType; buildStatus = 1; }
public static FacilityType getFacilityByName(string name) { FacilityType fc = null; using (var it = FacilityType.Values.GetEnumerator()) { while (it.MoveNext()) { FacilityType ft = it.Current; if (ft.getName().Equals(name)) { fc = ft; break; } } } return(fc); }