private void OnPuzzleCode(string IncomingCode) { PuzzleCodeEventArgs e = new PuzzleCodeEventArgs { Code = IncomingCode }; PuzzleCode.Invoke(e); }
public PuzzleCodeWindow(EventManager.Event e) { eventData = e; Game game = Game.Get(); guess = new List <int>(); questPuzzle = e.qEvent as QuestData.Puzzle; if (game.quest.puzzle.ContainsKey(questPuzzle.sectionName)) { puzzle = game.quest.puzzle[questPuzzle.sectionName] as PuzzleCode; previousMoves = puzzle.guess.Count; } else { puzzle = new PuzzleCode(questPuzzle.puzzleLevel, questPuzzle.puzzleAltLevel); } CreateWindow(); }
public PuzzleCodeWindow(EventManager.Event e) { eventData = e; Game game = Game.Get(); guess = new List <int>(); questPuzzle = e.qEvent as QuestData.Puzzle; buttons = GetButtons(); if (game.quest.puzzle.ContainsKey(questPuzzle.sectionName)) { // This puzzle was played before. Load up the previous moves. puzzle = game.quest.puzzle[questPuzzle.sectionName] as PuzzleCode; previousMoves = puzzle.guess.Count; } else { // Initialize a new puzzle puzzle = new PuzzleCode(questPuzzle.puzzleLevel, questPuzzle.puzzleAltLevel, questPuzzle.puzzleSolution); } CreateWindow(); }