コード例 #1
0
        protected override void OnCreate()
        {
            _boardCache = World.GetExistingSystem <BoardCacheSystem>();
            _events     = World.GetOrCreateSystem <EventSystem>();

            RequireSingletonForUpdate <GameComponent>();
        }
コード例 #2
0
        protected override void OnCreate()
        {
            _boardCache = World.GetExistingSystem <BoardCacheSystem>();
            RequireSingletonForUpdate <GameComponent>();

            _gemRng = new Random();
            _gemRng.InitState();

            _gemPrefabs = Entities.With(EntityQueryOptions.IncludePrefab).WithAll <GemComponent, Prefab>().ToEntityQuery();
        }
コード例 #3
0
 protected override void OnCreate()
 {
     _cache = World.GetOrCreateSystem <BoardCacheSystem>();
     RequireSingletonForUpdate <GameComponent>();
 }