private void Exit(P_BattleMap battlemap) { DebugBox.DismissP_Render(battlemap.Renderer); DebugBox.DismissUpdater(battlemap.Updater); DebugBox = null; _Cursor.DismissP_Render(battlemap.Renderer); _Cursor = null; }
private void Exit(P_BattleMap battlemap) { _MoveLights.DismissP_Render(battlemap.Renderer); _MoveLights.DismissUpdater(battlemap.Updater); _MoveLights = null; _Cursor.DismissP_Render(battlemap.Renderer); _Cursor = null; }
public P_BMSChose_Movement(P_BattleMap map, IEntityActor actor) { _Actor = actor; _Cursor = new P_SelectionCursor(actor.MyLocation); _Cursor.AcceptP_Render(map.Renderer); _CursorIndex = actor.MyTileIndex; _ValidMoveIndex = MovementRange(map, actor); _MoveLights = new P_MovementRangeLight(map, _ValidMoveIndex, actor); _MoveLights.AcceptP_Render(map.Renderer); _MoveLights.AcceptUpdater(map.Updater); map.MyState = this; }
public static void CursorOffScreen(P_BattleMap battlemap, P_SelectionCursor cursor) { if (cursor.Render.RelXCoords > P_Const.CONSOLE_WIDTH) { battlemap.Render.MyXCoords = 0 - P_Const.CONSOLE_WIDTH / 2 - (cursor.Render.RelXCoords - battlemap.Render.MyXCoords); } if (cursor.Render.RelXCoords < 0) { battlemap.Render.MyXCoords = P_Const.CONSOLE_WIDTH / 2 - (cursor.Render.RelXCoords - battlemap.Render.MyXCoords); } if (cursor.Render.RelYCoords > P_Const.CONSOLE_HEIGHT) { battlemap.Render.MyYCoords = 0 - P_Const.CONSOLE_HEIGHT / 2 - (cursor.Render.RelYCoords - battlemap.Render.MyYCoords); } if (cursor.Render.RelYCoords < 0) { battlemap.Render.MyYCoords = P_Const.CONSOLE_HEIGHT / 2 - (cursor.Render.RelYCoords - battlemap.Render.MyYCoords); } }
public P_BMSPlayerSelectingTile(P_BattleMap map) { map.MyState = this; Random rng = new Random(); DebugBox = new TilerIsADummy.PrototypeMapGen.PrototypeTextBox.P_DebugBattleBox(map); DebugBox.AcceptP_Render(map.Renderer); DebugBox.AcceptUpdater(map.Updater); while (true) { int num = rng.Next(0, map.MapEntity.Count); if (map.MapEntity[num].GetType() == typeof(EntityActor)) { EntityActor check = map.MapEntity[num] as EntityActor; if (check.TurnStatus == EntityCharacterTurnStatus.MyTurn && check.MyTileIndex > 0) { _Cursor = new P_SelectionCursor(check.MyLocation); _Cursor.AcceptP_Render(map.Renderer); CursorIndex = check.MyTileIndex; break; } } } }
public static void MoveTileCursor(P_BattleMap battlemap, TileNeighborEnum direction, P_SelectionCursor cursor, ref int cursorindex) { if (battlemap.TheMap.ValidDirection(cursorindex, direction)) { cursorindex = battlemap.TheMap.NeighborIndex(cursorindex, direction); cursor.Owner = battlemap.TheMap.MyTiles[cursorindex]; } }