public static AscensionHitboxBodySnapshot Create(AscensionHitboxBody body) { AscensionHitboxBodySnapshot sn = Pool.Acquire(); sn.Snapshot(body); return(sn); }
public void Dispose() { body = null; count = 0; wtl = Matrix4x4.identity; ltw = Matrix4x4.identity; Array.Clear(hbwtl, 0, hbwtl.Length); Array.Clear(hbltw, 0, hbltw.Length); Pool.Release(this); }
public void Snapshot(AscensionHitboxBody body) { this.body = body; count = Mathf.Min(body.hitboxes.Length, hbwtl.Length); if (body.proximity) { wtl = body.proximity.transform.worldToLocalMatrix; ltw = body.proximity.transform.localToWorldMatrix; } for (int i = 0; i < count; ++i) { hbwtl[i] = body.hitboxes[i].transform.worldToLocalMatrix; hbltw[i] = body.hitboxes[i].transform.localToWorldMatrix; } }
internal void Snapshot(AscensionHitboxBody body) { bodySnapshots.AddLast(AscensionHitboxBodySnapshot.Create(body)); }
internal static void UnregisterBody(AscensionHitboxBody body) { HitboxBodies.Remove(body); }
internal static void RegisterBody(AscensionHitboxBody body) { HitboxBodies.AddLast(body); }
internal void AddHit(AscensionHitboxBody body, AscensionHitbox hitbox, float distance) { hits.Add(new AscensionPhysicsHit { body = body, hitbox = hitbox, distance = distance }); }