Exemple #1
0
    /*
     * 只在编辑器下有效
     * Object cloneSrc = UnityEditor.AssetDatabase.LoadAssetAtPath("Assets/Sphere.prefab", typeof(GameObject));
     */


    PacketRouting AddPacket(string packName, IPacket packetObj)
    {
        if (!m_DonePacks.ContainsKey(packName))
        {
            m_DonePacks.Add(packName, new PacketRouting());
        }

        PacketRouting re = m_DonePacks[packName];

        re.Add(packetObj);
        return(re);
    }
Exemple #2
0
 static int Add(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         PacketRouting obj  = (PacketRouting)ToLua.CheckObject(L, 1, typeof(PacketRouting));
         IPacket       arg0 = (IPacket)ToLua.CheckObject(L, 2, typeof(IPacket));
         obj.Add(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }