public virtual void Click() { if (!running) { return; } if (locked) { return; } if (message.IsVisible() && !message.IsComplete()) { return; } bool isNext = false; if (!isSelectMessage && scrCG.sleep <= 0) { if (!scrFlag) { scrFlag = true; } if (message.IsVisible()) { isNext = message.Intersects(GetTouchX(), GetTouchY()); } else { isNext = true; } } else if (scrFlag && select.GetResultIndex() != -1) { OnSelect(selectMessage, select.GetResultIndex()); isNext = select.Intersects(GetTouchX(), GetTouchY()); if (isNext) { if (count++ >= 1) { message.SetVisible(false); select.SetVisible(false); isSelectMessage = false; selectMessage = null; count = 0; return; } } } if (isNext && !isSelectMessage) { NextScript(); } }
public void DoClick(LComponent comp) { if (comp.Tag is Screen) { LLKScreen screen = (LLKScreen)comp.Tag; LSelect select = (LSelect)comp; switch (select.GetResultIndex()) { case 0: screen.mes.SetVisible(true); if (screen.refreshcount > 0) { screen.mes.SetMessage(EASY_MES); screen.Refreshs(); } else { screen.mes.SetMessage(SORRY1_MES); } screen.Remove(select); break; case 1: screen.mes.SetVisible(true); if (screen.tipcount > 0) { screen.mes.SetMessage(EASY_MES); screen.ShowNext(); } else { screen.mes.SetMessage(SORRY2_MES); } screen.Remove(select); break; case 2: screen.mes.SetVisible(true); if (screen.bombcount > 0) { screen.mes.SetMessage(EASY_MES); screen.UseBomb(); } else { screen.mes.SetMessage(SORRY3_MES); } screen.Remove(select); break; case 3: screen.mes.SetVisible(true); screen.Remove(select); screen.mes.SetVisible(false); screen.role.SetVisible(false); screen.helpRole.SetVisible(true); if (screen.stage != null) { screen.stage.SetVisible(true); } break; default: break; } } }