public override void Init(EntityManager entityManager, Transform root) { if (isClient) { actorClientSystem = entityManager.World.GetExistingSystem <ActorSyncCreateClientSystem>(); } base.Init(entityManager, root); }
protected override void OnCreate() { actorSyncCreateClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>(); endBarrier = World.GetExistingSystem <EndCommandBufferSystem>(); networkConnectedMessageQuery = GetEntityQuery(new EntityQueryDesc { All = new ComponentType[] { ComponentType.ReadOnly <NetworkConnection>(), ComponentType.ReadOnly <NetworkConnectedMessage>() }, None = new ComponentType[] { ComponentType.ReadOnly <NetworkDisconnectedMessage>() }, }); }
protected void OnInit(Transform root) { actorSpawnerMap = root.GetComponentInChildren <IActorSpawnerMap>(); actorClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>(); powerLevelQuery = GetEntityQuery(new EntityQueryDesc { All = new ComponentType[] { ComponentType.ReadOnly <ShipPowers>(), ComponentType.ReadOnly <ActorAttribute1 <_PowerLevel> >(), ComponentType.ReadWrite <ActorAttribute3 <_Power> >() }, }); powerLevelQuery.SetFilterChanged(typeof(ActorAttribute1 <_PowerLevel>)); }
public override void Init(EntityManager entityManager, Transform root) { if (isClient) { actorClientSystem = entityManager.World.GetExistingSystem <ActorSyncCreateClientSystem>(); } if (prefabInServer != null) { Debug.LogError("prefabInServer != null server 不需要prefab"); } base.Init(entityManager, root); if (isServer) { sEntityArchetype = _entityArchetype; } }
public override void Init(EntityManager entityManager, Transform root) { if (isClient) { actorClientSystem = entityManager.World.GetExistingSystem <ActorSyncCreateClientSystem>(); } if (prefab != null) { Debug.LogError("prefab != null ShipLostInputFx用ship现成的ShipLostInputFx节点", this); } base.Init(entityManager, root); if (isServer) { sEntityArchetype = _entityArchetype; } }
public override void Init(EntityManager entityManager, Transform root) { base.Init(entityManager, root); if (isClient) { actorClientSystem = entityManager.World.GetExistingSystem <ActorSyncCreateClientSystem>(); Debug.Assert(actorClientSystem != null, $"actorClientSystem != null root={root}", root); } if (prefab != null) { Debug.LogError("prefab != null WeaponFirePrepareFx用weapon现成的WeaponFirePrepareFx节点", this); } if (isServer) { sEntityArchetype = _entityArchetype; } }
protected override void OnCreate() { actorClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>(); input = Rewired.ReInput.players.GetPlayer(InputPlayer.Player0); }
protected override void OnCreate() { actorClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>(); }