Ejemplo n.º 1
0
 public virtual void SetUpPlatformTile(Vector2 position)
 {
     // Make the ground in the physics world
     Vector2 startPosition = new Vector2(position.X - this.ScreenWidth * 0.5f, position.Y);
     Vector2 endPosition = new Vector2(position.X + this.ScreenWidth * 0.5f, position.Y);
     physicsLine = new PhysicsLine(this, this.world, startPosition, endPosition);
     physicsLine.body.Restitution = 0f;
     physicsLine.CollisionCategory = GameConstants.GroundCollisionCategory | GameConstants.PlatformCollisionCategory;
 }
Ejemplo n.º 2
0
        public virtual void SetUpPlatformTile(Vector2 position)
        {
            // Make the ground in the physics world
            Vector2 startPosition = new Vector2(position.X - this.ScreenWidth * 0.5f, position.Y);
            Vector2 endPosition   = new Vector2(position.X + this.ScreenWidth * 0.5f, position.Y);

            physicsLine = new PhysicsLine(this, this.world, startPosition, endPosition);
            physicsLine.body.Restitution  = 0f;
            physicsLine.CollisionCategory = GameConstants.GroundCollisionCategory | GameConstants.PlatformCollisionCategory;
        }