Module Introduction
Coding Style wiki
Basic Description
Event delegation center. You can implement the TClass registration type yourself, and then have a custom management class inherit from CenterBase<TCenter, TClass> to implement simple event dispatching. The following are provided by default.
Application Description
Default API
public static void Add<UClass>() where UClass : TClass, new()
public static void Add<UClass>(int id) where UClass : TClass, new()
public static void Add(int id, TClass @class)
public static void Delete<UClass>() where UClass : TClass
public static void Delete(int id)
public static void DeleteAll()
public static UClass Find<UClass>() where UClass : TClass
public static UClass Find<UClass>(int id) where UClass : TClass
EventCenter
Centralized Event integration module. You can customize the format of each Event for dispatching (you can also list event IDs for designers to fill in registered IDs in a table, allowing event ID retrieval and dispatching from the table).
- TClass: EventBase, the base class for a single Event. Created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> Event Center -> Template Event.cs).
- TCenter: EventCenter, used for the inheritance management layer, primarily for the registration phase. Created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> Event Center -> Template EventCenter.cs).
- Use Default API for Find calls.
APICenter
Centralized API integration module. You can customize the format of each API to make Http API short connection requests. It effectively centralizes the management of various API formats using Acax (similar to Ajax for requesting APIs).
- TClass: APIBase, the base class for a single API. Created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> API Center -> Template API.cs).
- TCenter: APICenter, used for the inheritance management layer, primarily for the registration phase. Created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> API Center -> Template APICenter.cs).
- Use Default API for Find calls.
Acax (Asynchronous C# and XML)
Acax provides short connections dedicated to requesting API data. The default provisions are as follows:
- Http.Acax (UnityWebRequest - using UnityEngine.Networking), supports main thread only.
- Recommended platforms: WebGL, WIN, OSX, Android, iOS.
- HttpNativeClient.Acax (HttpClient - using System.Net.Http New), supports other threads.
- Recommended platforms: WIN, OSX, Android, iOS.
- HttpNativeWebRequest.Acax (HttpWebRequest - using System.Net Old), supports other threads.
- Recommended platforms: WIN, OSX, Android, iOS.