コード例 #1
0
 void OnEnable()
 {
     Color.Initialize();
     SystemManagerSystem.Ignite();
     TimeSystem.Ignite();
     SpriteRendererSystem.Ignite();
     BulletSpawnSystem.Ignite();
     SparkSpawnSystem.Ignite();
     ExplosionSpawnSystem.Ignite();
     SightSpawnSystem.Ignite();
     GameManagerSystem.Ignite();
     LockTargetManager.Init();
 }
コード例 #2
0
        void OnEnable()
        {
            Color.Initialize();
            SpriteRendererSystem.Ignite();
            TimeSystem.Ignite();

            var entity_manager = World.Active.GetOrCreateManager <EntityManager>();
            var arche_type     = entity_manager.CreateArchetype(typeof(SpriteTestDummy)
                                                                , typeof(Position)
                                                                , typeof(Rotation)
                                                                , typeof(LocalToWorld)
                                                                );
            var entity = entity_manager.CreateEntity(arche_type);

            entity_manager.SetComponentData(entity, new Position {
                Value = new float3(1f, 2f, 10f),
            });
        }