private void PlaceQuestionmarks() { for (int x = 0; x < questionMarkIndices.Length; x++) { for (int y = 0; y < questionMarkIndices[x].Length; y++) { PyramidFloorBoardElement floorElem = floors[x].elements[questionMarkIndices[x][y]]; QuestionBoardElement questionElem = new QuestionBoardElement(floorElem, "floor" + x + "_qbe" + y); CommandQueue.Queue(new AddToBoardCommand(questionElem)); QuestionManager.Instance().AddQuestionBoardElement(questionElem, floorElem); } } }
public static MoveQBECommand FromInput(SerializableCommand sCommand) { try { QuestionBoardElement movingEl = (QuestionBoardElement)Board.Instance().FindByUID(sCommand.UID); PyramidFloorBoardElement floorEl = (PyramidFloorBoardElement)Board.Instance().FindByUID(sCommand.body); return(new MoveQBECommand(movingEl, floorEl)); } catch (InvalidCastException ice) { Console.WriteLine(ice.Message); return(null); } }
public void InitiateQuestionBoardElementMove(PyramidFloorBoardElement floorElementBelow) { isMovingQuestionBoardElement = true; movingQBE = questionElems[floorElems.IndexOf(floorElementBelow)]; movingQBE.SetZPosition(Board.Instance().MaxDepth + 1); }
public void MoveQuestionElementLocalOnly(QuestionBoardElement questionElement, PyramidFloorBoardElement floorElement) { questionElement.MoveToLocalOnly(floorElement); CommandQueue.Queue(new UpdateFloorElemsToQuestionMove(floorElems, floorElement, questionElems.IndexOf(questionElement))); }
public void AddQuestionBoardElement(QuestionBoardElement element, PyramidFloorBoardElement below) { questionElems.Add(element); floorElems.Add(below); }
public void ClickedSomePyramidBoardElement(PyramidFloorBoardElement element) { isMovingQuestionBoardElement = false; MoveQuestionElement(movingQBE, element); movingQBE = null; }
public MoveQBECommand(QuestionBoardElement element, PyramidFloorBoardElement moveTo) { this.element = element; this.moveTo = moveTo; }