예제 #1
0
        private PhysicsObject CreateBorder(double width, double height)
        {
            PhysicsObject b = PhysicsObject.CreateStaticObject(width, height);

            b.Color = Color.Gray;
            b.Body.CollisionIgnorer = ignorerForBorders;
            game.Add(b);
            return(b);
        }
예제 #2
0
파일: RoadMap.cs 프로젝트: Anttifer/Jypeli
        private PhysicsObject CreateSegment(double width, double height, Shape shape)
        {
            PhysicsObject o = PhysicsObject.CreateStaticObject(width, height, shape);

            o.Color = Color.Gray;
            o.IgnoresCollisionResponse = true;
            o.KineticFriction          = DefaultFriction;

            // TopDownPhysicsGame does not exist in MonoJypeli
            //if (Game.Instance is TopDownPhysicsGame)
            //{
            //    TopDownPhysicsGame g = (TopDownPhysicsGame)Game.Instance;
            //    g.AddSurface(o);
            //}
            //else
            //{
            Game.Instance.Add(o);
            //}

            return(o);
        }