static int Hide(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); GuideTip obj = (GuideTip)LuaScriptMgr.GetUnityObjectSelf(L, 1, "GuideTip"); obj.Hide(); return(0); }
static int AutoHide(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); GuideTip obj = (GuideTip)LuaScriptMgr.GetUnityObjectSelf(L, 1, "GuideTip"); float arg0 = (float)LuaScriptMgr.GetNumber(L, 2); obj.AutoHide(arg0); return(0); }
public MatchReviseTip(GameMatch match) { this.match = match; match.mCurScene.mBall.onShoot += OnShoot; guideTip = UIManager.Instance.CreateUI("GuideTip").AddMissingComponent <GuideTip>(); guideTip.GetComponent <UIPanel>().depth = 1100; guideTip.transform.localPosition = new Vector3(-20, -262, 0); guideTip.firstButtonVisible = false; guideTip.instructorVisible = true; guideTip.instructor = "effects_guide"; guideTip.instructorPos = new Vector3(-248, -11, 0); guideTip.Hide(); }
protected override void _OnLoadingCompleteImp() { base._OnLoadingCompleteImp(); m_stateMachine.m_matchStateListeners.Add(this); mCurScene.mBall.onCatch = OnCatchBall; matchReviseTip = new MatchReviseTip(this); timer = new GameUtils.Timer(IM.Number.half, () => { ShowGuide("Intro"); }, 1); //load tip resource guideTip = UIManager.Instance.CreateUI("GuideTip").AddMissingComponent <GuideTip>(); guideTip.GetComponent <UIPanel>().depth = 1000; guideTip.transform.localPosition = new Vector3(79, 230, 0); guideTip.instructorVisible = true; guideTip.instructor = "effects_guide"; guideTip.instructorPos = new Vector3(-444, -18, 0); guideTip.onFirstButtonClick = OnTipClick; guideTip.Hide(); }
static int get_firstButtonText(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name firstButtonText"); } else { LuaDLL.luaL_error(L, "attempt to index firstButtonText on a nil value"); } } LuaScriptMgr.Push(L, obj.firstButtonText); return(1); }
static int set_instructorPos(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name instructorPos"); } else { LuaDLL.luaL_error(L, "attempt to index instructorPos on a nil value"); } } obj.instructorPos = LuaScriptMgr.GetVector3(L, 3); return(0); }
static int set_nextButtonVisible(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name nextButtonVisible"); } else { LuaDLL.luaL_error(L, "attempt to index nextButtonVisible on a nil value"); } } obj.nextButtonVisible = LuaScriptMgr.GetBoolean(L, 3); return(0); }
static int set_tip(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name tip"); } else { LuaDLL.luaL_error(L, "attempt to index tip on a nil value"); } } obj.tip = LuaScriptMgr.GetString(L, 3); return(0); }
static int get_instructorVisible(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name instructorVisible"); } else { LuaDLL.luaL_error(L, "attempt to index instructorVisible on a nil value"); } } LuaScriptMgr.Push(L, obj.instructorVisible); return(1); }
static int set_onFirstButtonClick(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); GuideTip obj = (GuideTip)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name onFirstButtonClick"); } else { LuaDLL.luaL_error(L, "attempt to index onFirstButtonClick on a nil value"); } } LuaTypes funcType = LuaDLL.lua_type(L, 3); if (funcType != LuaTypes.LUA_TFUNCTION) { obj.onFirstButtonClick = (UIEventListener.VoidDelegate)LuaScriptMgr.GetNetObject(L, 3, typeof(UIEventListener.VoidDelegate)); } else { LuaFunction func = LuaScriptMgr.ToLuaFunction(L, 3); obj.onFirstButtonClick = (param0) => { int top = func.BeginPCall(); LuaScriptMgr.Push(L, param0); func.PCall(top, 1); func.EndPCall(top); }; } return(0); }
protected override void OnFirstStart() { base.OnFirstStart(); plot = UIManager.Instance.CreateUI("UIPlayPlot").GetComponent <UIPlayPlot>(); plot.Hide(); plot.onNext = OnPlotNext; match.HideSignal(); match.HideTitle(); match.HideBackButton(); guideTip = UIManager.Instance.CreateUI("GuideTip_3").AddMissingComponent <GuideTip>(); guideTip.transform.localPosition = new Vector3(18, -316, 0); guideTip.firstButtonVisible = false; guideTip.Hide(); foreach (UController.Button btn in match.m_uiController.m_btns) { if (btn.btn != null) { UIEventListener.Get(btn.btn.gameObject).onPress += OnBtnPress; } } match.onTipClick += OnTipClick; ball.onGrab += OnGrab; ball.onCatch += OnCatch; ball.onShoot += OnShoot; ball.onHitGround += OnHitGround; match.mCurScene.mBasket.onGoal += OnGoal; prefabObjFinish = ResourceLoadManager.Instance.LoadPrefab("Prefab/GUI/MatchGuideObjectiveFinish") as GameObject; paneObjective = UIManager.Instance.CreateUI("MatchGuideObjectivePane"); UIGrid gridObj = paneObjective.transform.FindChild("Grid").GetComponent <UIGrid>(); GameObject prefabItem = ResourceLoadManager.Instance.LoadPrefab("Prefab/GUI/MatchGuideObjectiveItem") as GameObject; PractiseStep step = GameSystem.Instance.PractiseStepConfig.GetFirstStep(); readyStepID = step.ID; while (true) { if (step.startObjective.Key != 0) { lastObjID = step.startObjective.Key; GameObject item = CommonFunction.InstantiateObject(prefabItem, gridObj.transform); item.GetComponentInChildren <UILabel>().text = step.startObjective.Value; objectives.Add(step.startObjective.Key, item); } if (step.next == 0) { break; } else { step = GameSystem.Instance.PractiseStepConfig.GetStep(step.next); } } gridObj.Reposition(); }