static int StartPlay(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); PlayBase obj = (PlayBase)ToLua.CheckObject <PlayBase>(L, 1); obj.StartPlay(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// 设置界面状态 /// </summary> /// <param name="_state">0.介绍阶段,1.游戏阶段</param> private void SetUIState(int _state) { this.state = _state; introUI.gameObject.SetActive(0 == this.state); playUI.gameObject.SetActive(1 == this.state); if (0 == this.state) { SetCountdownTime(this.playInfo.IntroEndTime); //设置玩法介绍image play_data playData = PlayDataConfig.Instance.GetDataByID(this.playInfo.PlayId); Function.SetImageSprite(introUI.Find("PlayIntro/Image").GetComponent <Image>(), playData.IntroIcon); } else { SetCountdownTime(this.playInfo.EndTime); //开始玩 playBase.StartPlay(); } }