public void RegisterObject(GameObject toRegister, GameObject prefab)
        {
            var renderer = toRegister.GetComponent<SpriteRenderer>();
            if (renderer)
            {
                IList<Vector2> localConvexHull = ConvexHullDatabase.Instance.GetLocalConvexHull(prefab);

                var newData = new TrackedObjectData(toRegister, renderer, localConvexHull);
                ObjectTrackerDatabase.Add(toRegister, newData);
            }
        }
Beispiel #2
0
 private void Update()
 {
     ObjectTrackerDatabase.UpdateAll();
 }
Beispiel #3
0
 public void UnregisterObject(GameObject toUnregister)
 {
     ObjectTrackerDatabase.Remove(toUnregister);
 }