void OnPuzzleCompleteProcessed(object sender, InstantMessageArgs args) { exitMode = Exitmode.Victory; PuzzleCompleteStatus completeStatus = (PuzzleCompleteStatus)args.arg; GlobalManager.MStorage.GalleryLevel = completeStatus.descriptor.init.id; GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.PuzzleBusy, this, true); GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.BackgroundMusic, this, BackGroundMusicMode.Off); GlobalManager.MAudio.PlayMusicTrack(victoryMusicId, false); GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.PuzzleShowWinimage, this, completeStatus.firstTime ? victoryId : levelCompletedOnceAgainId); }
void OnPuzzleTileFlashed(object sender, InstantMessageArgs args) { if (puzzleComplete && startVictoryScreen) { startVictoryScreen = false; PuzzleCompleteStatus completeStatus = new PuzzleCompleteStatus { descriptor = descriptor, firstTime = !descriptor.state.Complete }; // ok, the puzzle is complete, the player has won /**/ //descriptor.state.Complete = true; /**/ GlobalManager.MInstantMessage.DeliverMessage(InstantMessageType.PuzzleComplete, this, completeStatus); } }