/// <summary> /// INITIALIZER 1 : For predefined objects /// </summary> /// <param name="shapeType"></param> public ASCII_Shape(DrawTool.ShapeTypes shapeType) { Left = 0; Top = 0; ShapeType = shapeType; shapeHeight = PredefinedShapes.Get_Height(shapeType); shapeWidth = PredefinedShapes.Get_Width(shapeType); lStrings = PredefinedShapes.Get_ListStrings(shapeType); lColors = PredefinedShapes.Get_ListColors(shapeType); IDnumber = PUBV.GetNextShapeIndex(); PUBV.Initialize_NewShape(this); }
public static List <string> Get_ListColors(DrawTool.ShapeTypes shapeType) { switch (shapeType) { case DrawTool.ShapeTypes.Sword: return(lSword_Colors); case DrawTool.ShapeTypes.Axe: return(lAxe_Colors); case DrawTool.ShapeTypes.Hammer: return(lHammer_Colors); case DrawTool.ShapeTypes.Unarmed: return(lUnarmed_Colors); case DrawTool.ShapeTypes.Building_0: return(lBuilding0_Colors); default: return(null); } }
public static int Get_Height(DrawTool.ShapeTypes shapeType) { switch (shapeType) { case DrawTool.ShapeTypes.Sword: return(lSword.Count); case DrawTool.ShapeTypes.Axe: return(lAxe.Count); case DrawTool.ShapeTypes.Hammer: return(lHammer.Count); case DrawTool.ShapeTypes.Unarmed: return(lUnarmed.Count); case DrawTool.ShapeTypes.Building_0: return(lBuilding0.Count); default: return(-1); } }
// These are for initializing predefined shapes public static int Get_Width(DrawTool.ShapeTypes shapeType) { switch (shapeType) { case DrawTool.ShapeTypes.Sword: return(lSword[0].Length); case DrawTool.ShapeTypes.Axe: return(lAxe[0].Length); case DrawTool.ShapeTypes.Hammer: return(lHammer[0].Length); case DrawTool.ShapeTypes.Unarmed: return(lUnarmed[0].Length); case DrawTool.ShapeTypes.Building_0: return(lBuilding0[0].Length); default: return(-1); } }