Esempio n. 1
0
        private static object GetObjectFromIdInternal(uint id, string idString, string type)
        {
            object ret;

            switch (type)
            {
            case "node":
                ret = NetLogic.PrepareNode((ushort)(id));
                break;

            case "segment":
                ret = NetLogic.PrepareSegment((ushort)(id));
                break;

            case "building":
                ret = ManagersLogic.PrepareBuilding((ushort)(id));
                break;

            case "prop":
                ret = ManagersLogic.PrepareProp((ushort)(id));
                break;

            case "tree":
                ret = ManagersLogic.PrepareTree((uint)(id));
                break;

            case "net prefab":
                ret = NetLogic.PrepareNetInfo(idString);
                break;

            default:
                throw new Exception($"Unknown type '{type}'");
            }
            return(ret);
        }
Esempio n. 2
0
 public static object GetNetPrefabFromName(object msg)
 {
     return(NetLogic.PrepareNetInfo((string)msg));
 }