private void handleJigsawScene() { if (_jigsaw == null) { _jigsaw = new Jigsaw(1); AddChild(_jigsaw); } if (_startPutText) { ((MyGame)game).Talk(); ((MyGame)game).Play("Put.wav", 6000); ((MyGame)game).Textbaloon("textJigsaw.png"); _startPutText = false; } else if (_startPutText != true && Input.GetMouseButtonDown(0) && _doOnce3) { ((MyGame)game).Down(); _doOnce3 = false; } if (_jigsaw._IsGameFinished) { { setScene(Scene.QUIZ); if (_jigsaw != null) { _jigsaw.LateDestroy(); _jigsaw = null; } } } }
public void WriteBackTheSameFile() => Common.FileOpenRead(FileName, stream => { Helpers.AssertStream(stream, inStream => { var outStream = new MemoryStream(); Jigsaw.Write(outStream, Jigsaw.Read(inStream)); return(outStream); }); });
public void HasRightAmountOfEntries() => Common.FileOpenRead(FileName, stream => { Assert.Equal(0x9E, Jigsaw.Read(stream).Count); });
public void HasRightAmountOfEntries() => File.OpenRead(FileName).Using(stream => { Assert.Equal(0x9E, Jigsaw.Read(stream).Count); });