Allar's Blog

Allar's Blog

Static Multidimensional Array!?

This is the first time I made a static multidimensional array, moreso, one with 3 dimensions. I'm still experimenting to find out how efficient this is, but so far it is proving to be extremely efficient as its structured so indexing it uses enum's that correspond to the right data you want. There were some comments and stuff describing which block did what but I'm not allowed to discuss the project this is for so I had to remove them. Its also indented nicely but WordPress owned my indentation.

static Vector2[][][] StaticData=
{
new Vector2[][]
{
new Vector2[]
{
new Vector2(500,534),
new Vector2(582,534),
new Vector2(663,533),
new Vector2(746,534),
},
new Vector2[]
{
new Vector2(500,87),
new Vector2(582,87),
new Vector2(663,86),
new Vector2(746,87),
},
},
new Vector2[][]
{
new Vector2[]
{
new Vector2(582,445),
new Vector2(663,445),
new Vector2(582,561),
new Vector2(663,561),
},
new Vector2[]
{
new Vector2(582,50),
new Vector2(663,50),
new Vector2(582,165),
new Vector2(663,165),
},
},
new Vector2[][]
{
new Vector2[]
{
new Vector2(210,523),
new Vector2(292,523),
new Vector2(373,522),
new Vector2(456,523),
},
new Vector2[]
{
new Vector2(750,523),
new Vector2(833,523),
new Vector2(913,522),
new Vector2(996,523),
},
new Vector2[]
{
new Vector2(209,77),
new Vector2(293,76),
new Vector2(374,76),
new Vector2(456,77),
},
new Vector2[]
{
new Vector2(750,77),
new Vector2(833,76),
new Vector2(913,76),
new Vector2(996,77),
},
},
new Vector2[][]
{
new Vector2[]
{
new Vector2(332,421),
new Vector2(413,421),
new Vector2(332,537),
new Vector2(413,537),
},
new Vector2[]
{
new Vector2(833,421),
new Vector2(913,421),
new Vector2(833,537),
new Vector2(913,537),
},
new Vector2[]
{
new Vector2(332,72),
new Vector2(413,72),
new Vector2(332,189),
new Vector2(413,189),
},
new Vector2[]
{
new Vector2(833,72),
new Vector2(913,72),
new Vector2(833,189),
new Vector2(913,189),
},
},
};