protected void OnInit(Transform root) { // endBarrier = World.GetExistingSystem <EndCommandBufferSystem>(); // actorSpawnerMap = root.GetComponentInChildren <IActorSpawnerMap>(); Debug.Assert(actorSpawnerMap != null, $"actorSpawnerMap != null root={root}", root); // var startPointsT = root.Find(nameof(startPoints)); if (startPointsT == null) { Debug.LogError("startPointsT == null"); return; } startPoints = new Transform[startPointsT.childCount]; var i = 0; foreach (Transform c in startPointsT) { startPoints[i] = c; ++i; } }
protected new void OnInit(Transform root) { base.OnInit(root); // World.GetExistingSystem <NetworkStreamConnectSuccessSystem>().AddSystem(this); // actorSpawnerMap = root.GetComponentInChildren <IActorSpawnerMap>(); Debug.Assert(actorSpawnerMap != null, $"actorSpawnerMap != null root={root}", root); // input = Rewired.ReInput.players.GetPlayer(InputPlayer.Player0); mouseInput = input.controllers.Mouse; // rootPlane = new Plane(Vector3.up, root.position); var singletonEntity = GetSingletonEntity <MyPlayerSingleton>(); EntityManager.AddComponent <MouseDataSingleton>(singletonEntity); // mouseFx = GameObject.Find("mousePoint").GetComponent <IMouseFx>(); }
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>)); }
protected void OnInit(Transform root) { actorSpawnerMap = root.GetComponentInChildren <IActorSpawnerMap>(); Debug.Assert(actorSpawnerMap != null, $"actorSpawnerMap != null root={root}", root); }
protected override void OnDestroy() { actorSpawnerMap = null; _actorEntityFromActorId.Dispose(); }
protected override void OnDestroy() { actorSpawnerMap = null; }