Example #1
0
        public NodeTitle(GameUI myGameUI, int myDepth)
            : base(myGameUI, 
                myDepth, 
                myGameUI.Puzzle.Details.Name,
                new Font("Lucida Console", 17f),
                new SolidBrush(Color.Yellow),
                new SolidBrush(Color.DarkOrange),
                new VectorInt(myGameUI.GameCoords.WindowRegion.TopMiddle.Add(-50, 3)))
        {
            secondLine = new NodeEffectText(myGameUI, myDepth - 1, "Sokoban rocks!", CurrentAbsolute.Add(0, 30));
            secondLine.Brush = new SolidBrush(secondLineColour);
            secondLine.Font = new Font("Arial", 11f);
            secondLine.IsVisible = false;

            currentLine = 0;
            lines = GetTextLines().ToArray();

            myGameUI.Add(secondLine);

            chain = new ActionChain();
            chain.Add(new ActionMethod(SelectNextMessage));
            chain.Add(new ActionCounter(20, 250, 4, new ActionDelegate(SetAlpha))); // FadeIn
            chain.Add(new ActionCounter(0, 50)); // wait
            chain.Add(new ActionCounter(250, 0, -7, new ActionDelegate(SetAlpha))); // FadeOut
            chain.Add(new ActionRetartChain(chain));

            chain.Init();
        }
        public NodePuzzleWin(GameUI myGameUI, int myDepth, VectorInt pos)
            : base(myGameUI, myDepth)
        {
            CurrentAbsolute = pos;
            chain = new ActionChain();
            chain.Add(new ActionCounter(0, 100, 2, ReSizeText));

            chain.Init();

            winner = new NodeEffectText(myGameUI, myDepth+1, "Congratz!!!", new Font("Arial", 10f), font, fontBK, pos);
            myGameUI.Add(winner);
        }
 public ActionRetartChain(ActionChain chain, int maxRetarts)
 {
     this.chain = chain;
     restartCount = new ActionCounter(0, maxRetarts);
 }
 public ActionRetartChain(ActionChain chain)
 {
     this.chain = chain;
 }