コード例 #1
0
        public Collider(BoundingBox bounding, Component comp, GameObject owner)
        {
            if (collidersList == null)
            {
                collidersList = new List <Collider>();
            }

            component   = comp;
            boundingBox = bounding;
            collidersList.Add(this);
            this.owner = owner;
        }
コード例 #2
0
        //TODO Styczeń to nie działa, robimy to inaczej, żal skasować, napraw xd
        public override void Dispose()
        {
            owner?.colliders.Remove(this);
            owner = null;

            foreach (Collider collider in collidersList)
            {
                collider?.Dispose();
                collidersList.Remove(collider);
            }

            base.Dispose();
        }