Inheritance: Puzzles
Exemplo n.º 1
0
    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;
                }
            }
        }
    }
Exemplo n.º 2
0
        public void WriteBackTheSameFile() => Common.FileOpenRead(FileName, stream =>
        {
            Helpers.AssertStream(stream, inStream =>
            {
                var outStream = new MemoryStream();
                Jigsaw.Write(outStream, Jigsaw.Read(inStream));

                return(outStream);
            });
        });
Exemplo n.º 3
0
 public void HasRightAmountOfEntries() => Common.FileOpenRead(FileName, stream =>
 {
     Assert.Equal(0x9E, Jigsaw.Read(stream).Count);
 });
Exemplo n.º 4
0
 public void HasRightAmountOfEntries() => File.OpenRead(FileName).Using(stream =>
 {
     Assert.Equal(0x9E, Jigsaw.Read(stream).Count);
 });