Beispiel #1
0
        public bool Equals(PhysicsPart physicsPart)
        {
            if (Part == null)
            {
                return(physicsPart == null);
            }

            return(Part.Equals(physicsPart));
        }
Beispiel #2
0
        public void RemovePart(PhysicsPart part)
        {
            var removeParts = new List <ShadowPart>();

            foreach (var shadowPart in ShadowPartList)
            {
                if (!part.Equals(shadowPart.Part))
                {
                    continue;
                }
                removeParts.Add(shadowPart);
            }

            foreach (var removePart in removeParts)
            {
                ShadowPartList.Remove(removePart);
            }

            NumShadowParts -= removeParts.Count;
        }
Beispiel #3
0
        public void RemovePart(PhysicsPart part)
        {
            // FIXME: null parts
            if (part == null)
            {
                return;
            }

            var removeParts = new List <ShadowPart>();

            foreach (var shadowPart in ShadowPartList.ToList())
            {
                if (part.Equals(shadowPart))
                {
                    removeParts.Add(shadowPart);
                }
            }

            foreach (var removePart in removeParts)
            {
                ShadowPartList.Remove(removePart);
            }
        }