public LvlTraversalData(Vector2 inCoords, LvlTraversalAction inMarker, GameObject inObj, int inInt) { pixelCoords = inCoords; action = inMarker; traversalObj = inObj; additionalInt = inInt; }
static void AddLvlTraversalMarkerToList(Dictionary <int, List <LvlTraversalData> > markerList, LvlTraversalAction action, int optionalInt = 0) { BlockLvlImgLoader loaderWindow = (BlockLvlImgLoader)EditorWindow.GetWindow(typeof(BlockLvlImgLoader)); int level = loaderWindow.GetCurrentLvl(); Vector2 pixelCoord = loaderWindow.GetCurrentPixelCoords(); GameObject traversalObj = loaderWindow.GetLastInstantiatedObj(); if (!markerList.ContainsKey(level)) { markerList.Add(level, new List <LvlTraversalData>()); } markerList[level].Add(new LvlTraversalData(pixelCoord, action, traversalObj, optionalInt)); }
public static void GenerateStairs(int numSteps, LvlTraversalAction action) { AddLvlTraversalMarkerToList(stairMarkers, action, numSteps); }
static public void GenerateRamp(LvlTraversalAction action) { AddLvlTraversalMarkerToList(rampMarkers, action); }