예제 #1
0
        //---------------------------------------------------------------------------

        public void ClearFixtures()
        {
            if (Fixtures.Count > 0)
            {
                Body body = Fixtures.First().Body;
                if (body != null)
                {
                    foreach (Fixture fixture in Fixtures)
                    {
                        body.DestroyFixture(fixture);
                    }
                    Fixtures.Clear();
                }
            }
        }
예제 #2
0
        //---------------------------------------------------------------------------

        protected Color GetDebugColor()
        {
            if (Fixtures.Count == 0)
            {
                return(Color.White);
            }
            switch (Fixtures.First().Body.BodyType)
            {
            case BodyType.Dynamic: return(new Color(0.067f, 0.812f, 0.129f));

            case BodyType.Static: return(new Color(0.812f, 0.067f, 0.153f));

            default: return(Color.White);
            }
        }