示例#1
0
 void test_distortion()
 {
     for (var i = 0; i < 1; ++i)
     {
         var pos = random_.NextFloat3Direction() * 4f;
         DistortionSystem.Instantiate(World.Active.EntityManager,
                                      DistortionManager.Prefab,
                                      pos,
                                      10f /* period */,
                                      1f /* size */);
     }
 }
示例#2
0
 void test_distortion()
 {
     for (var i = 0; i < 1; ++i)
     {
         var pos = random_.NextFloat3Direction() * 4f;
         DistortionSystem.Instantiate(World.DefaultGameObjectInjectionWorld.EntityManager,
                                      DistortionManager.Prefab,
                                      pos,
                                      10f /* period */,
                                      1f /* size */,
                                      Time.GetCurrent());
     }
 }
 protected override void OnCreate()
 {
     _query = GetEntityQuery(new EntityQueryDesc()
     {
         All = new ComponentType[] {
             ComponentType.ReadOnly <DistortionComponent>(),
         },
     });
     _distortionSystem   = World.GetOrCreateSystem <DistortionSystem>();
     _matricesInRenderer = new Matrix4x4[BatchNum][];
     for (var i = 0; i < BatchNum; ++i)
     {
         _matricesInRenderer[i] = new Matrix4x4[Cv.InstanceLimit];
     }
 }