40 lines
1.1 KiB
C#
Raw Normal View History

2024-08-17 14:27:18 +08:00
using JNGame.Math;
using JNGame.Sync.Frame.Service;
using JNGame.Sync.State.Tile;
using JNGame.Sync.System;
namespace Game.Logic.System
{
public class DGBasisSystem : SLogicSystem
{
public JNRandomSystem Random => GetSystem<JNRandomSystem>();
//判断是否是Tile模式
public bool IsTile()
{
return Sync is JNSSTileServerService;
}
//获取当前权限瓦块随机点
public LVector3 GetTileRandom()
{
if (Sync is JNSSTileServerService tileServer)
{
return new LVector3(
Random.Float(tileServer.MinContains.x,tileServer.MaxContains.x),
LFloat.Zero,
Random.Float(tileServer.MinContains.y,tileServer.MaxContains.y)
);
}
return LVector3.Down;
}
2024-09-23 03:50:27 +08:00
/// <summary>
/// [状态同步生命周期] 玩家离开服务器 不在游戏线程中执行
/// </summary>
public virtual void OnPlayerExitServer(int auth){}
2024-08-17 14:27:18 +08:00
}
}