コード例 #1
0
ファイル: LLKScreen.cs プロジェクト: vb0067/LGame
            public void DownClick(LComponent comp, float x, float y)
            {
                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);
                        }
                    }
                }
            }
コード例 #2
0
ファイル: LLKScreen.cs プロジェクト: vb0067/LGame
            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);
                    }
                }
            }