// END CUT HERE // BEGIN CUT HERE public static void Main() { try { PowerPlants ___test = new PowerPlants(); ___test.run_test(-1); } catch (Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { PowerPlants ___test = new PowerPlants(); ___test.run_test(-1); } catch(Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
/// <summary> /// Creates a building object and returns that object. If specified type does not exists returns null. /// </summary> /// <param name="unitType"></param> /// <returns></returns> public UnitBase Create(UnitType unitType) { UnitBase unitBase = null; switch (unitType) { case UnitType.Barrack: unitBase = new Barracks(new UnitSpawnTileSelector()) { XDimension = 4, YDimension = 4, MoveableUnitPrototypes = { CreateMoveableUnit("soldier") } }; break; case UnitType.PowerPlant: unitBase = new PowerPlants() { XDimension = 2, YDimension = 3 }; break; case UnitType.Camp: unitBase = new Camp(new UnitSpawnTileSelector()) { XDimension = 3, YDimension = 2, MoveableUnitPrototypes = { CreateMoveableUnit("camper"), CreateMoveableUnit("soldier") } }; break; default: Debug.LogError("This type of product is not specified."); break; } return(unitBase); }