Esempio n. 1
0
 public static string getName(blockType type)
 {
     
     BlockData t = new BlockData(type);
     
     return t.name;
 }
Esempio n. 2
0
        public TextShow(Vector2 location, blockType type,bool canBeDraged, bool can_spawn)
           : base(location, (int)Game.fonts["font32"].MeasureString(BlockData.getName(type)).X + 8 + 4 + 4, (int)Game.fonts["font32"].MeasureString(BlockData.getName(type)).Y + 8 + 4 + 4)
        {
            
            can_spawn = true;


            this.canBeDraged = canBeDraged;
            this.can_spawn = can_spawn;
            this.type = type;
            
            
            blockData = new BlockData(type);
            border_widths = new int[] { 4, 4, 4, 4 };
            
            font = "font32";
            inside_color = Color.Yellow;
            border_colors = blockData.borderColours;
            text_color = blockData.textColour;
            text = blockData.name;
            sprite_height = (int)Game.fonts["font16"].MeasureString(text).Y+ border_widths[1]+ border_widths[3];
            sprite_length = (int)Game.fonts["font16"].MeasureString(text).X +border_widths[0]+ border_widths[2];

            data = new Color[width * height];
            data_to_convert = new Color[width, height];

            

            generateTextureComplex(new int[4] { 4, 4, 4, 4 }, border_colors, inside_color);
        }