Example #1
0
        public void EnterState()
        {
            letterOnSequence = 0;

            isSequence = game.CurrentQuestion.IsSequence();

            questionProgress = 0;

            if (isSequence)
            {
                correctAnswers = game.CurrentQuestion.Answers.Count;
            }
            else
            {
                correctAnswers = 3;
            }

            game.HintButton.gameObject.SetActive(true);
            game.eggController.onEggPressedCallback = OnHintPressed;
            UnityEngine.UI.Button.ButtonClickedEvent clickEvent = game.HintButton.onClick;

            if (clickEvent == null)
            {
                game.HintButton.onClick = clickEvent = new UnityEngine.UI.Button.ButtonClickedEvent();
            }
            clickEvent.AddListener(OnHintPressed);

            EnableAllGameplayInput();

            nextStateTimer = 0f;
            toNextState    = false;

            inputButtonTimer         = 0f;
            inputButtonCount         = 0;
            repeatInputHasProgressed = false;
            enteredRepeatMode        = false;

            game.eggButtonBox.SetOnPressedCallback(OnEggButtonPressed);

            showTutorial = game.ShowTutorial;
            game.EndTutorial();
            tutorialCorrectActive = false;
            tutorialDelayTimer    = tutorialDelayTime;
            tutorialStop          = false;

            if (showTutorial)
            {
                ShowTutorialPressCorrect();
            }

            if (!showTutorial)
            {
                game.InitializeOverlayWidget();
            }

            EnableAllGameplayInput();
        }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.UI.Button.ButtonClickedEvent o;
         o=new UnityEngine.UI.Button.ButtonClickedEvent();
         pushValue(l,true);
         pushValue(l,o);
         return 2;
     }
     catch(Exception e) {
         return error(l,e);
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.UI.Button.ButtonClickedEvent o;
         o=new UnityEngine.UI.Button.ButtonClickedEvent();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
        int __CreateInstanceUnityEngineUIButtonButtonClickedEvent(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;

            if (gen_param_count == 1)
            {
                UnityEngine.UI.Button.ButtonClickedEvent gen_ret = new UnityEngine.UI.Button.ButtonClickedEvent();
                translator.Push(L, gen_ret);

                return(1);
            }


            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.Button.ButtonClickedEvent constructor!"));
        }
Example #5
0
        public void ExitState()
        {
            game.HintButton.gameObject.SetActive(false);
            UnityEngine.UI.Button.ButtonClickedEvent clickEvent = game.HintButton.onClick;

            if (clickEvent != null)
            {
                clickEvent.RemoveListener(OnHintPressed);
            }
            if (showTutorial)
            {
                TutorialUI.Clear(true);
            }

            game.eggButtonBox.SetOnPressedCallback(null);
        }
Example #6
0
        static StackObject *Add_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Action action = (System.Action) typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.Button.ButtonClickedEvent buttonClickedEvent = (UnityEngine.UI.Button.ButtonClickedEvent) typeof(UnityEngine.UI.Button.ButtonClickedEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ETModel.ActionHelper.Add(buttonClickedEvent, action);

            return(__ret);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.UI.Button.ButtonClickedEvent __cl_gen_ret = new UnityEngine.UI.Button.ButtonClickedEvent();
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.Button.ButtonClickedEvent constructor!"));
        }
    static int _CreateUnityEngine_UI_Button_ButtonClickedEvent(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            UnityEngine.UI.Button.ButtonClickedEvent obj = new UnityEngine.UI.Button.ButtonClickedEvent();
            LuaScriptMgr.PushObject(L, obj);
            return 1;
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.UI.Button.ButtonClickedEvent.New");
        }

        return 0;
    }
Example #9
0
        static StackObject *set_onClick_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.Button.ButtonClickedEvent @value = (UnityEngine.UI.Button.ButtonClickedEvent) typeof(UnityEngine.UI.Button.ButtonClickedEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.Button instance_of_this_method = (UnityEngine.UI.Button) typeof(UnityEngine.UI.Button).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.onClick = value;

            return(__ret);
        }
        private static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data)
        {
            try
            {
                {
                    {
                        var result = new UnityEngine.UI.Button.ButtonClickedEvent();


                        return(Puerts.Utils.GetObjectPtr((int)data, typeof(UnityEngine.UI.Button.ButtonClickedEvent), result));
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
            }
            return(IntPtr.Zero);
        }
    static int _CreateUnityEngine_UI_Button_ButtonClickedEvent(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                UnityEngine.UI.Button.ButtonClickedEvent obj = new UnityEngine.UI.Button.ButtonClickedEvent();
                ToLua.PushObject(L, obj);
                return 1;
            }
            else
            {
                return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.UI.Button.ButtonClickedEvent.New");
            }
        }
        catch(Exception e)
        {
            return LuaDLL.toluaL_exception(L, e);
        }
    }
Example #12
0
            public static GameObject Create(GameObject dest, string text, string desc, string name, Vector3 pos, UnityEngine.UI.Button.ButtonClickedEvent onClick)
            {
                GameObject btn = GameObject.Instantiate(GameObject.Find("UserInterface/QuickMenu/QuickModeMenus/QuickModeInviteResponseMoreOptionsMenu/BlockButton").transform, dest.transform).gameObject;

                btn.transform.localPosition = Utils.ConvertToUnityUnits(pos);
                btn.name = name;
                btn.GetComponentInChildren <Text>().text             = text;
                btn.GetComponent <UnityEngine.UI.Button>().onClick   = onClick;
                btn.GetComponent <UiTooltip>().field_Public_String_0 = desc;
                btn.SetActive(true);
                return(btn);
            }