コード例 #1
0
 public void loadFromFile(string file)
 {
     if (file.EndsWith(".js"))
     {
         JSBridgeGamemode bridge = new JSBridgeGamemode(api);
         bridge.Load(file);
         loadFromObject(bridge);
     }
     else
     {
         Assembly    asm      = Assembly.LoadFile(System.IO.Path.GetFullPath(file));
         List <Type> types    = asm.GetTypes().ToList();
         Gamemode    gamemode =
             (Gamemode)types.First(a => a.BaseType == typeof(Gamemode))
             .GetConstructor(new Type[1] {
             typeof(ServerApi)
         })
             .Invoke(new object[1] {
             api
         });
         loadFromObject(gamemode);
     }
 }
コード例 #2
0
 public void loadFromObject(Gamemode gamemode)
 {
     current = gamemode;
 }
コード例 #3
0
 public void loadFromObject(Gamemode gamemode)
 {
     current = gamemode;
 }