readme
This commit is contained in:
parent
8ec10332f8
commit
49cbd6836c
|
@ -4,6 +4,8 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace BITKit
|
namespace BITKit
|
||||||
{
|
{
|
||||||
/// <summary>泛型事件,简单的事件接口</summary>
|
/// <summary>泛型事件,简单的事件接口</summary>
|
||||||
|
|
46
Readme.md
46
Readme.md
|
@ -13,25 +13,55 @@
|
||||||
### Prerequisites 项目使用条件
|
### Prerequisites 项目使用条件
|
||||||
|
|
||||||
你需要一些小小的nuget程序包,或者一些小小的Unity Packages
|
你需要一些小小的nuget程序包,或者一些小小的Unity Packages
|
||||||
|
### UniTask
|
||||||
|
提供异步支持
|
||||||
|
```csharp
|
||||||
|
//切换到线程池
|
||||||
|
await UniTask.SwichToThreadPool();
|
||||||
|
//在Unity中切换到主线程
|
||||||
|
await UniTask.SwitchToMainThread();
|
||||||
|
//在异步中等待,直到某个条件达成或取消
|
||||||
|
await UniTask.WaitUtil(()=>completed);
|
||||||
```
|
```
|
||||||
UniTask 提供异步处理
|
***
|
||||||
|
### Newtonsoft.json
|
||||||
|
提供json的序列化与反序列化
|
||||||
|
```csharp
|
||||||
|
//序列化数据
|
||||||
|
var json = JsonConvert.SerializeObject(value);
|
||||||
|
//反序列化json为数据
|
||||||
|
var value = JsonConvert.DeserializeObject<MyValue>(json);
|
||||||
```
|
```
|
||||||
|
***
|
||||||
|
### Unity.Mathematics
|
||||||
|
提供数学结构
|
||||||
|
```csharp
|
||||||
|
//float3 通常用于坐标和向量
|
||||||
|
float3 position=new(0,1,0);
|
||||||
|
//quaternion 四元数,通常用于旋转
|
||||||
|
quaternion rotation=new(1,1,1,1);
|
||||||
```
|
```
|
||||||
Unity.Mathematics 提供数学结构
|
### (可选)GameDesigner
|
||||||
```
|
提供主要的网络服务(未来可能会用内置KCP)
|
||||||
```
|
``` csharp
|
||||||
(可选) GameDesigner 提供主要的网络服务(未来可能会用内置KCP)
|
//注册Rpc处理服务
|
||||||
|
ClientBase.Instance.AddRpcHandle(this);
|
||||||
|
//向服务器发送Rpc
|
||||||
|
ClientBase.Instance.SendRT("RpcName",intValue,floatValue,stirngValue);
|
||||||
```
|
```
|
||||||
在Unity中,你还需要以下Plugins:
|
在Unity中,你还需要以下Plugins:
|
||||||
|
|
||||||
```
|
```
|
||||||
Sirenix Odin
|
Sirenix.Odin 为Unity提供基本的数据序列化(准备移除)
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
Demigiant DOTween
|
Demigiant.DOTween 为Unity提供补间动画支持
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
Rotary Heart SerializableDictionaryLite (已下架)
|
RotaryHeart.SerializableDictionaryLite为Unity提供序列化字典(已下架)
|
||||||
|
```
|
||||||
|
```
|
||||||
|
Unity.Addressables 为Unity添加可寻址资源的资源管理方案
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installation 安装
|
### Installation 安装
|
||||||
|
|
Loading…
Reference in New Issue