Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        // 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);
            }
        }