mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
基础案例 准备改帧同步了
This commit is contained in:
@@ -7,6 +7,7 @@ namespace JNGame.Sync.Frame.Entity.Component.Components
|
||||
{
|
||||
|
||||
public LVector3 Position = new();
|
||||
public LVector3 Scale = new(1,1,1);
|
||||
|
||||
public bool IsRange(LVector3 target,LFloat len)
|
||||
{
|
||||
|
@@ -113,7 +113,9 @@ namespace JNGame.Sync.Frame.Entity
|
||||
}
|
||||
|
||||
//生命周期
|
||||
public virtual void OnSyncStart(){}
|
||||
public virtual void OnSyncStart()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnSyncUpdate(int dt)
|
||||
{
|
||||
@@ -128,7 +130,8 @@ namespace JNGame.Sync.Frame.Entity
|
||||
}
|
||||
|
||||
public virtual void OnSyncDestroy()
|
||||
{}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public interface IJNContext : IJNSyncCycle
|
||||
|
@@ -39,13 +39,17 @@ namespace JNGame.Sync.Entity
|
||||
public JNEntityLookup CLookup{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 坐标
|
||||
/// Transform 组件
|
||||
/// </summary>
|
||||
public JNTransformComponent Transform => CLookup.Query<JNTransformComponent>(this);
|
||||
/// <summary>
|
||||
/// 位置
|
||||
/// </summary>
|
||||
public LVector3 Position => Transform.Position;
|
||||
/// <summary>
|
||||
/// 大小
|
||||
/// </summary>
|
||||
public LVector3 Scale => Transform.Scale;
|
||||
|
||||
public bool IsDelayDestroy { get; private set; } = false;
|
||||
|
||||
@@ -142,7 +146,9 @@ namespace JNGame.Sync.Entity
|
||||
}
|
||||
|
||||
//生命周期
|
||||
public virtual void OnSyncStart(){}
|
||||
public virtual void OnSyncStart()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnSyncUpdate(int dt)
|
||||
{
|
||||
|
Reference in New Issue
Block a user