mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
30 lines
840 B
C#
30 lines
840 B
C#
using JNGame.Math;
|
|
using JNGame.Sync.Frame.Service;
|
|
using JNGame.Sync.State.Tile;
|
|
using JNGame.Sync.State.Tile.Entity;
|
|
|
|
namespace Game.Logic.Entity
|
|
{
|
|
public abstract class EDEntityBasis : JNTileEntity
|
|
{
|
|
|
|
public JNRandomSystem Random => Context.GetSync().GetSystem<JNRandomSystem>();
|
|
|
|
//获取当前权限瓦块随机点
|
|
public LVector3 GetTileRandom()
|
|
{
|
|
|
|
if (Context.GetSync() 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;
|
|
}
|
|
|
|
|
|
}
|
|
} |