Пример #1
0
            public void Run()
            {
                screen.stage = new Label("Stage - " + screen.stageNo, 140, 25);
                screen.stage.SetColor(LColor.black);
                screen.stage.SetFont(LFont.GetDefaultFont());
                screen.Add(screen.stage);
                screen.time = new Label("time", 270, 25);
                screen.time.SetColor(LColor.black);
                screen.time.SetFont(LFont.GetDefaultFont());
                screen.Add(screen.time);
                message.SetVisible(false);
                screen.role.SetVisible(false);
                message.SetVisible(false);
                screen.init  = true;
                screen.count = 0;

                screen.progress = new StatusBar(screen.progress_number,
                                                screen.progress_number, 325, 5, 150, 25);
                screen.progress.SetDead(true);
                screen.Add(screen.progress);
                if (screen.title == null)
                {
                    screen.title = new LPaper(screen.GetImage(15), 55, 55);
                }
                else
                {
                    screen.title.SetLocation(55, 55);
                }
                screen.CenterOn(screen.title);
                screen.Add(screen.title);
                if (screen.stageNo < 5)
                {
                    if (screen.helpRole == null)
                    {
                        screen.helpRole = new Sprite(screen.GetImage(8));
                        screen.helpRole.SetLocation(screen
                                                    .GetWidth()
                                                    - screen.helpRole.GetWidth() - 10,
                                                    screen.GetHeight()
                                                    - screen.helpRole.GetHeight()
                                                    - 10);
                        screen.Add(screen.helpRole);
                    }
                    else
                    {
                        screen.helpRole.SetVisible(true);
                        screen.Add(screen.helpRole);
                    }
                }
                else
                {
                    if (screen.helpRole != null)
                    {
                        screen.helpRole.SetVisible(false);
                    }
                }
            }
Пример #2
0
            public void DoClick(LComponent comp)
            {
                if (comp.Tag is LLKScreen)
                {
                    LMessage  message = (LMessage)comp;
                    LLKScreen screen  = (LLKScreen)comp.Tag;
                    if (!screen.init)
                    {
                        if (screen.count == 0)
                        {
                            screen.role.SetImage(screen.GetImage(12));
                            message.SetMessage(START_MES);
                        }
                        else if (message.IsComplete())
                        {
                            screen.CallEvent(new _Runnable(screen, message));
                        }
                        screen.count++;
                    }

                    if (HELP_MES.Equals(message.GetMessage(), StringComparison.InvariantCultureIgnoreCase) && message.IsComplete())
                    {
                        message.SetVisible(false);
                        screen.select = new LSelect(screen.GetImage(14), (screen
                                                                          .GetWidth() - 460) / 2,
                                                    screen.GetHeight() - 126 - 10);
                        screen.select.Tag = screen;
                        screen.select.SetFontColor(LColor.black);
                        screen.select.SetAlpha(0.8f);
                        screen.select.SetTopOffset(-5);
                        screen.select.SetMessage(new String[] { "1.刷新", "2.提示", "3.炸弹",
                                                                "4.取消" });
                        screen.select.Click = new SelectClick();
                        screen.Add(screen.select);
                        return;
                    }
                    else if ((EASY_MES.Equals(message.GetMessage(), StringComparison.InvariantCultureIgnoreCase) || message.GetMessage()
                              .StartsWith(SORRY)) &&
                             message.IsComplete())
                    {
                        screen.mes.SetVisible(false);
                        screen.role.SetVisible(false);
                        screen.helpRole.SetVisible(true);
                        if (screen.stage != null)
                        {
                            screen.stage.SetVisible(true);
                        }
                    }
                }
            }
Пример #3
0
            public override void Run()
            {
                LLKScreen screen = (LLKScreen)StaticCurrentSceen;
                Grid      prev   = null;

                for (int j = 0; j < v.Count; j++)
                {
                    prev = (Grid)v.Poll();
                    prev.SetVisible(true);
                    v.Add(prev);
                    try
                    {
                        Sleep(20L);
                    }
                    catch (Exception)
                    {
                    }
                }
                Grid current = prev;

                prev = (Grid)v.Poll();
                while (!v.IsEmpty())
                {
                    Grid o = (Grid)v.Poll();
                    o.SetVisible(false);
                    try
                    {
                        Sleep(20L);
                    }
                    catch (Exception)
                    {
                    }
                }
                prev.SetVisible(false);
                current.SetVisible(false);
                current.SetImage(screen.GetImage(9));
                prev.SetImage(screen.GetImage(9));
                current.SetBorder(1);
                prev.SetBorder(1);
                if (!screen.FindPair())
                {
                    screen.Refreshs();
                }
            }