Skip to content

Instantly share code, notes, and snippets.

@rtroe
Last active December 2, 2015 01:53
Show Gist options
  • Save rtroe/b19d852525102bc543e9 to your computer and use it in GitHub Desktop.
Save rtroe/b19d852525102bc543e9 to your computer and use it in GitHub Desktop.
Example of Previous Hardcoded Euclidean Code
//Set Level Bounds
Level_X_Max = 30;
Level_Y_Max = 5;
Level_Z_Max = 15;
//Set Entrance/Exit Positions
Vector_EntrancePos = new Vector3(0, 0, 5);
Vector_ExitPos = new Vector3(Level_X_Max, 7, 5);
base.LoadContent();
//
//Load In Pillars
//
for (int x = 0; x < Level_X_Max; x++)
{
for (int z = 0; z < Level_Z_Max; z++)
{
if (z > 5 && z < 10)
{
if (x == 12)
AddGreyPillar(EntityOrientation.Floor, new Vector3(x, 3, z));
else if (x == Level_X_Max - 1)
AddGreyPillar(EntityOrientation.Floor, new Vector3(x, 7, z));
else if ( x > 12)
AddWhitePillar(EntityOrientation.Floor, new Vector3(x, 3, z));
}
else if (x == Level_X_Max - 1 && z > 4 && z < 11)
AddGreyPillar(EntityOrientation.Floor, new Vector3(x, 7, z));
else
AddWhitePillar(EntityOrientation.Floor, new Vector3(x, 0, z));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment