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

            try {
                if (LuaAPI.lua_gettop(L) >= 1 && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 2) || translator.Assignable <object>(L, 2)))
                {
                    object[] args = translator.GetParams <object>(L, 2);

                    CEventEventParamArgs __cl_gen_ret = new CEventEventParamArgs(args);
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    CEventEventParamArgs __cl_gen_ret = new CEventEventParamArgs();
                    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 CEventEventParamArgs constructor!"));
        }
        static int _g_get_mMoreParam(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                CEventEventParamArgs __cl_gen_to_be_invoked = (CEventEventParamArgs)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.mMoreParam);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 响应最佳刷怪点的按钮的点击消息
        /// </summary>
        /// <param name="evt"></param>
        public void MonsterSelectChange(CEventBaseArgs evt)
        {
            if (IsEnable == false)
            {
                return;
            }

            if (evt is CEventEventParamArgs)
            {
                CEventEventParamArgs moreEvt = evt as CEventEventParamArgs;
                string           str         = moreEvt.mMoreParam[0] as string;
                MiniMapPointInfo info        = moreEvt.mMoreParam[1] as MiniMapPointInfo;
                if (str.CompareTo("MiniMap") != 0)// 不是Minimap的时候,显示怪物挂机的提示框
                {
                    MonsterTipsTrigger.gameObject.SetActive(true);
                    MonsterTipsTrigger.transform.SetAsLastSibling();
                    SetMonsterTipsInfo(info);
                }
            }
        }
        static int _m_GetMoreParam(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            CEventEventParamArgs __cl_gen_to_be_invoked = (CEventEventParamArgs)translator.FastGetCSObj(L, 1);


            try {
                {
                    uint index = LuaAPI.xlua_touint(L, 2);

                    object __cl_gen_ret = __cl_gen_to_be_invoked.GetMoreParam(index);
                    translator.PushAny(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 5
0
        void OnStartPickUpLocalPlayer(CEventBaseArgs data_param)
        {
            if (data_param == null)
            {
                return;
            }
            if ((data_param is CEventEventParamArgs) == false)
            {
                return;
            }
            CEventEventParamArgs data = data_param as CEventEventParamArgs;

            if (data.mMoreParam == null)
            {
                return;
            }
            if (data.mMoreParam.Length <= 1)
            {
                return;
            }
            PkgDropGive drop_info = data.mMoreParam[0] as PkgDropGive;
            uint        drop_type = 0;

            drop_type = uint.Parse(data.mMoreParam[1] as string);
            if (drop_info == null)
            {
                return;
            }

            if (mTimer != null)
            {
                return;
            }
            xc.InstanceManager.Instance.IsAutoFighting = false;//停止自动挂机

            mTimer         = new Utils.Timer(100, true, 200, UpdatePick);
            mDropInfo      = drop_info;
            mDropType      = drop_type;
            mStartPickTime = Time.realtimeSinceStartup;
            Actor         local_player = xc.Game.Instance.GetLocalPlayer();
            Vector3       drop_com_pos = local_player.transform.position;
            DropComponent drop_com     = InstanceDropManager.Instance.GetDrop(drop_info.oid);

            if (local_player != null && drop_com != null)
            {
                drop_com_pos = drop_com.transform.position;
                (local_player as Player).StartPickUpBossChipEffect(drop_com.transform.position);
            }
            C2SNwarPickBossChipStart reply = new C2SNwarPickBossChipStart();

            reply.action        = new PkgNwarPickBossChip();
            reply.action.uuid   = local_player.UID.obj_idx;
            reply.action.oid    = mDropInfo.oid;
            reply.action.pos    = new PkgNwarPos();
            reply.action.pos.px = (int)(drop_com_pos.x * 100);
            reply.action.pos.py = (int)(drop_com_pos.y * 100);
            NetClient.GetCrossClient().SendData <C2SNwarPickBossChipStart>(NetMsg.MSG_NWAR_PICK_BOSS_CHIP_START, reply);

            string sound_path = "Assets/" + ResPath.Sound_ui_xihun;

            m_pick_boss_sound_id = xc.AudioManager.Instance.PlayAudio_dynamic_out(sound_path, false, 1);
        }