mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 10:46:17 +00:00
修复主从交互bug
This commit is contained in:
@@ -34,6 +34,10 @@ namespace Game.JNGFrame.Logic.Entity.Controller
|
||||
|
||||
public override void OnSyncStart()
|
||||
{
|
||||
|
||||
//Player 同步到从服务器
|
||||
TileEntity.IsSyncSlave = true;
|
||||
|
||||
base.OnSyncStart();
|
||||
Move.Speed = LFloat.L10;
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Game.JNGFrame.Logic.Entity.Controller;
|
||||
using Entitas;
|
||||
using Game.JNGFrame.Logic.Entity.Controller;
|
||||
using Game.Logic.Entity.Nodes;
|
||||
using Game.Logic.Entity.Nodes.Component.Components;
|
||||
using JNGame.Sync.State.Tile.Entity;
|
||||
@@ -7,6 +8,7 @@ namespace Game.JNGFrame.Logic.Entity.Contexts
|
||||
{
|
||||
public sealed partial class EDPlayerContext : JNTileContext<EDPlayer>
|
||||
{
|
||||
|
||||
protected override EDPlayer BindComponent(EDPlayer entity)
|
||||
{
|
||||
base.BindComponent(entity);
|
||||
@@ -14,5 +16,6 @@ namespace Game.JNGFrame.Logic.Entity.Contexts
|
||||
entity.AddComponent<EDPlayerController>();
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -13,12 +13,6 @@ namespace Game.Logic.Entity.Nodes
|
||||
public EDMoveComponent Move => CLookup.Query<EDMoveComponent>(this);
|
||||
public EDBossController Controller => CLookup.Query<EDBossController>(this);
|
||||
|
||||
public override void TileSyncData(ISTileData data)
|
||||
{
|
||||
var nodeData = data as EDBossData;
|
||||
Transform.Position = nodeData.Value.Position.ToLVector3();
|
||||
}
|
||||
|
||||
public override JNEntityLookup NewCLookup()
|
||||
{
|
||||
return new EDBoosLookup();
|
||||
|
@@ -12,13 +12,6 @@ namespace Game.Logic.Entity.Nodes
|
||||
|
||||
public EDMoveComponent Move => CLookup.Query<EDMoveComponent>(this);
|
||||
|
||||
|
||||
public override void TileSyncData(ISTileData data)
|
||||
{
|
||||
var nodeData = data as EDNodeData;
|
||||
Transform.Position = nodeData.Value.Position.ToLVector3();
|
||||
}
|
||||
|
||||
public override JNEntityLookup NewCLookup()
|
||||
{
|
||||
return new EDNodeLookup();
|
||||
|
@@ -16,9 +16,9 @@ namespace Game.Logic.Entity.Nodes
|
||||
|
||||
public override void TileSyncData(ISTileData data)
|
||||
{
|
||||
base.TileSyncData(data);
|
||||
var nodeData = data as EDPlayerData;
|
||||
Controller.AuthBind(nodeData.Value.Auth.Value);
|
||||
Transform.Position = nodeData.Value.Position.ToLVector3();
|
||||
}
|
||||
|
||||
public override JNEntityLookup NewCLookup()
|
||||
|
Reference in New Issue
Block a user