资源简介
unity帧同步demo版,其中包括客户端和服务端,客户端是unity,服务端是skynet的
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
public class KCP
{
public const int IKCP_RTO_NDL = 30; // no delay min rto
public const int IKCP_RTO_MIN = 100; // normal min rto
public const int IKCP_RTO_DEF = 200;
public const int IKCP_RTO_MAX = 60000;
public const int IKCP_CMD_PUSH = 81; // cmd: push data
public const int IKCP_CMD_ACK = 82; // cmd: ack
public const int IKCP_CMD_WASK = 83; // cmd: window probe (ask)
public const int IKCP_CMD_WINS = 84; // cmd: window size (tell)
public const int IKCP_ASK_SEND = 1; // need to send IKCP_CMD_WASK
public const int IKCP_ASK_TELL = 2; // need to send IKCP_CMD_WINS
public const int IKCP_WND_SND = 32;
public const int IKCP_WND_RCV = 32;
public const int IKCP_MTU_DEF = 1400;
public const int IKCP_ACK_FAST = 3;
public const int IKCP_INTERVAL = 100;
public const int IKCP_OVERHEAD = 24;
public const int IKCP_DEADlink = 10;
public const int IKCP_THRESH_INIT = 2;
public const int IKCP_THRESH_MIN = 2;
public const int IKCP_PROBE_INIT = 7000; // 7 secs to probe window size
public const int IKCP_PROBE_LIMIT = 120000; // up to 120 secs to probe window
// encode 8 bits unsigned int
public static int ikcp_encode8u(byte[] p int offset byte c)
{
p[0 + offset] = c;
return 1;
}
// decode 8 bits unsigned int
public static int ikcp_decode8u(byte[] p int offset ref byte c)
{
c = p[0 + offset];
return 1;
}
/* encode 16 bits unsigned int (lsb) */
public static int ikcp_encode16u(byte[] p int offset UInt16 w)
{
p[0 + offset] = (byte)(w >> 0);
p[1 + offset] = (byte)(w >> 8);
return 2;
}
/* decode 16 bits unsigned int (lsb) */
public static int ikcp_decode16u(byte[] p int offset ref UInt16 c)
{
UInt16 result = 0;
result |= (UInt16)p[0 + offset];
result |= (UInt16)(p[1 + offset] << 8);
c = result;
return 2;
}
/* encode 32 bits unsigned int (lsb) */
public static int ikcp_encode32u(byte[] p int offset UInt32 l)
{
p[0 + offset] = (byte)(l >> 0);
p[1 + offset] = (byte)(l >> 8);
p[2 + offset] = (byte)(l >> 16);
p[3 + offset] = (byte)(l >> 24);
return 4;
}
/* decode 32 bits unsigned int (lsb) */
public static int ikcp_decode32u(byte[] p int offset ref UInt32 c)
{
UInt32 result = 0;
result |= (UInt32)p[0 + offset];
result |= (UInt32)(p[1 + offset] << 8);
result |= (UInt32)(p[2 + offset] << 16);
result |= (UInt32)(p[3 + offset] << 24);
c = result;
return 4;
}
public static byte[] slice(byte[] p int start int stop) {
var bytes =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-30 09:26 BrickAndBall-master\
文件 336 2018-10-21 21:52 BrickAndBall-master\.gitignore
目录 0 2018-11-19 11:02 BrickAndBall-master\.vs\
目录 0 2018-11-19 11:02 BrickAndBall-master\.vs\BrickAndBall-master\
目录 0 2018-11-19 17:59 BrickAndBall-master\.vs\BrickAndBall-master\v15\
文件 153600 2018-11-26 16:48 BrickAndBall-master\.vs\BrickAndBall-master\v15\.suo
文件 921600 2018-11-19 17:59 BrickAndBall-master\.vs\BrickAndBall-master\v15\Browse.VC.db
目录 0 2018-11-19 11:02 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\
目录 0 2018-11-19 11:02 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\sqlite3\
文件 0 2018-11-19 11:02 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\sqlite3\db.lock
文件 4096 2018-11-19 11:02 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\sqlite3\storage.ide
文件 32768 2018-11-26 09:49 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\sqlite3\storage.ide-shm
文件 3180672 2018-11-26 16:48 BrickAndBall-master\.vs\BrickAndBall-master\v15\Server\sqlite3\storage.ide-wal
目录 0 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\
目录 0 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\AutoPCH\
目录 0 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\AutoPCH\18c2aa80e3abc177\
文件 1114112 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\AutoPCH\18c2aa80e3abc177\LUTIL.ipch
目录 0 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\AutoPCH\b3cde4fa0f6eda43\
文件 1114112 2018-11-19 17:08 BrickAndBall-master\.vs\BrickAndBall-master\v15\ipch\AutoPCH\b3cde4fa0f6eda43\LKCP.ipch
目录 0 2018-10-21 21:52 BrickAndBall-master\Assets\
目录 0 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\
目录 0 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\
文件 190677 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.xm
文件 200 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.xm
文件 143872 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.dll
文件 55846 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.dll.mdb
文件 197 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.dll.mdb.me
文件 693 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween.dll.me
文件 9728 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween43.dll
文件 1789 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween43.dll.mdb
文件 197 2018-10-21 21:52 BrickAndBall-master\Assets\3rd\DOTween\DOTween43.dll.mdb.me
............此处省略2826个文件信息
相关资源
- unity3d 各种鸟类模型资源 带动画 BIR
- 一个unity迷宫小游戏
- FBX Importer & Exporter for Unity - $120 自购稀
- UniStorm v4.1.0(u2019.1.0).unitypackage
- Unity 3d 家畜动物模型带动作
- Questions.unitypackage
- NVIDIA HairWorks for Unity 毛发查件
- unity捕鱼源码
- unity折叠菜单
- 暴风魔镜VR 、HTC VR插件 及制作网址
- 山寨Pokemon go的尝试demo的源码一
- untiy3D开发的小游戏坦克大战
- unity 接入高德地图 包括源码和生成好
- 2.5D Platformer Engineunity2.5D精美游戏框架
- Unity3D人物怪物互攻小游戏Demo
- Unity 2D游戏开发从入门到精通 pdf 完整
- Unity3D项目游戏设置界面NGUI
- Unity3D模拟太阳系
- unityAction-RPGStarterKit6.01.zip
- Unity脚本设计
- Azure Kinect Examples for Unity 1.9.1.unitypac
- unity3D制作的飞车单机小游戏
- neo4j-community-3.4.0-windows.zip
- Magic Slashes FX 1.0.unitypackage
- AVPro Video 1.11.7 最新版无水印
- Survival Shooter噩梦射手成品.rar
- Unity3D人工智能编程精粹代码
- unity3D空战游戏《鹰击长空》源码
- unity体积雾详解内含中文版
- Unity 3d 森林动物模型资源包带动作
评论
共有 条评论