Exemplo n.º 1
0
 /// <summary>
 /// LateUpdate is called every frame, if the Behaviour is enabled.
 /// It is called after all Update functions have been called.
 /// </summary>
 void LateUpdate()
 {
     DanmakuCollider.RebuildSpatialHashes();
     UpdateHandle = default(JobHandle);
     foreach (var group in RendererGroups.Values)
     {
         UpdateHandle = JobHandle.CombineDependencies(UpdateHandle, group.StartUpdate());
         JobHandle.ScheduleBatchedJobs();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Update is called every frame, if the MonoBehaviour is enabled.
 /// </summary>
 void Update()
 {
     UpdateHandle.Complete();
     if (DanmakuCollider.ColliderCount <= 0)
     {
         return;
     }
     foreach (var group in RendererGroups.Values)
     {
         foreach (var set in group.Sets)
         {
             DanmakuCollider.TestPoolCollisions(set.Pool);
         }
     }
     DanmakuCollider.FlushAll();
 }
 /// <summary>
 /// Reset is called when the user hits the Reset button in the Inspector's
 /// context menu or when adding the component the first time.
 /// </summary>
 void Reset()
 {
     Collider = GetComponent <DanmakuCollider>();
 }
Exemplo n.º 4
0
 public void Execute(int index)
 {
     Bounds.Center     = Positions[index];
     Collisions[index] = DanmakuCollider.TestCollisions(Bounds);
 }