示例#1
0
        public override void Init(EntityManager entityManager, Transform root)
        {
            if (isClient)
            {
                actorClientSystem = entityManager.World.GetExistingSystem <ActorSyncCreateClientSystem>();
            }

            base.Init(entityManager, root);
        }
示例#2
0
        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>() },
            });
        }
示例#3
0
        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;
            }
        }
示例#5
0
        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;
            }
        }
示例#7
0
 protected override void OnCreate()
 {
     actorClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>();
     input             = Rewired.ReInput.players.GetPlayer(InputPlayer.Player0);
 }
示例#8
0
 protected override void OnCreate()
 {
     actorClientSystem = World.GetExistingSystem <ActorSyncCreateClientSystem>();
 }