示例#1
0
        void OnEnable()
        {
            TimeSystem.Ignite();

            var entity_manager = World.Active.GetOrCreateManager <EntityManager>();
            var arche_type     = entity_manager.CreateArchetype(typeof(SparkTestDummy),
                                                                typeof(RandomLocal));
            var entity = entity_manager.CreateEntity(arche_type);

            entity_manager.SetComponentData(entity, RandomMaker.create());
        }
示例#2
0
 void OnEnable()
 {
     Color.Initialize();
     SystemManagerSystem.Ignite();
     TimeSystem.Ignite();
     SpriteRendererSystem.Ignite();
     BulletSpawnSystem.Ignite();
     SparkSpawnSystem.Ignite();
     ExplosionSpawnSystem.Ignite();
     SightSpawnSystem.Ignite();
     GameManagerSystem.Ignite();
     LockTargetManager.Init();
 }
示例#3
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),
            });
        }
 void Initialize()
 {
     //UnityEngine.Application.targetFrameRate = 60;
     TimeSystem.Ignite();
 }