public override System.Collections.Generic.IEnumerable <UniRx.IObservable <int> > Install(uFrame.ECS.APIs.IComponentSystem componentSystem) { GunnerManager = componentSystem.RegisterComponent <Gunner>(); yield return(GunnerManager.CreatedObservable.Select(_ => _.EntityId));; yield return(GunnerManager.RemovedObservable.Select(_ => _.EntityId));; GunnerInputManager = componentSystem.RegisterComponent <GunnerInput>(); yield return(GunnerInputManager.CreatedObservable.Select(_ => _.EntityId));; yield return(GunnerInputManager.RemovedObservable.Select(_ => _.EntityId));; }
public override System.Collections.Generic.IEnumerable <UniRx.IObservable <int> > Install(uFrame.ECS.APIs.IComponentSystem componentSystem) { playerCompManager = componentSystem.RegisterComponent <playerComp>(); yield return(playerCompManager.CreatedObservable.Select(_ => _.EntityId));; yield return(playerCompManager.RemovedObservable.Select(_ => _.EntityId));; healthCompManager = componentSystem.RegisterComponent <healthComp>(); yield return(healthCompManager.CreatedObservable.Select(_ => _.EntityId));; yield return(healthCompManager.RemovedObservable.Select(_ => _.EntityId));; }
public override System.Collections.Generic.IEnumerable <UniRx.IObservable <int> > Install(uFrame.ECS.APIs.IComponentSystem componentSystem) { SwordManager = componentSystem.RegisterComponent <Sword>(); yield return(SwordManager.CreatedObservable.Select(_ => _.EntityId));; yield return(SwordManager.RemovedObservable.Select(_ => _.EntityId));; ShieldManager = componentSystem.RegisterComponent <Shield>(); yield return(ShieldManager.CreatedObservable.Select(_ => _.EntityId));; yield return(ShieldManager.RemovedObservable.Select(_ => _.EntityId));; HealthManager = componentSystem.RegisterComponent <Health>(); yield return(HealthManager.CreatedObservable.Select(_ => _.EntityId));; yield return(HealthManager.RemovedObservable.Select(_ => _.EntityId));; }
public override System.Collections.Generic.IEnumerable <UniRx.IObservable <int> > Install(uFrame.ECS.APIs.IComponentSystem componentSystem) { componentSystem.PropertyChangedEvent <Gun, GunState>(_ => _.StateObservable, (c, v) => { UpdateItem(c.EntityId); }); GunManager = componentSystem.RegisterComponent <Gun>(); yield return(GunManager.CreatedObservable.Select(_ => _.EntityId));; yield return(GunManager.RemovedObservable.Select(_ => _.EntityId));; }