Exemplo n.º 1
0
 public override bool NextScript(String mes)
 {
     // 自定义命令(有些自定义命令为了突出写成了中文,实际不推荐)
     if (roleName != null)
     {
         if ("noname".Equals(mes, StringComparison.InvariantCultureIgnoreCase))
         {
             roleName.SetVisible(false);
         }
         else if ("name0".Equals(mes, StringComparison.InvariantCultureIgnoreCase))
         {
             roleName.SetVisible(true);
             roleName.SetBackground("assets/name0.png");
             roleName.SetLocation(5, 15);
         }
         else if ("name1".Equals(mes, StringComparison.InvariantCultureIgnoreCase))
         {
             roleName.SetVisible(true);
             roleName.SetBackground("assets/name1.png");
             roleName.SetLocation(GetWidth() - roleName.GetWidth() - 5, 15);
         }
     }
     if ((flag + "星星").Equals(mes, StringComparison.InvariantCultureIgnoreCase))
     {
         // 添加脚本事件标记(需要点击后执行)
         SetScrFlag(true);
         type = 1;
         return(false);
     }
     else if ((flag + "去死吧,星星").Equals(mes, StringComparison.InvariantCultureIgnoreCase))
     {
         type = 0;
     }
     else if ((flag + "关于天才").Equals(mes, StringComparison.InvariantCultureIgnoreCase))
     {
         message.SetVisible(false);
         SetScrFlag(true);
         // 强行锁定脚本
         SetLocked(true);
         yes       = new LButton("assets/dialog_yes.png", 112, 33);
         yes.Tag   = this;
         yes.Click = new YesClick();
         CenterOn(yes);
         Add(yes);
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public override void OnLoading()
 {
     roleName = new LPaper("assets/name0.png", 25, 25);
     LeftOn(roleName);
     roleName.SetLocation(5, 15);
     Add(roleName);
 }