예제 #1
0
 public MModel(MModel m)
 {
     position   = new Point(m.position);
     dimensions = new Dimension(m.dimensions);
     velocity   = new Velocity(m.velocity);
     if (target != null)
     {
         target = new Point(m.target);
     }
 }
예제 #2
0
 public MModel(MModel m)
 {
     position = new Point(m.position);
       dimensions = new Dimension(m.dimensions);
       velocity = new Velocity(m.velocity);
       if (target != null)
       {
     target = new Point(m.target);
       }
 }
예제 #3
0
 public Drawable(Game game, int sx, int sy, MModel d)
     : base(game)
 {
     displayable = d;
     sourceX     = sx;
     sourceY     = sy;
     dimensions  = displayable.dimensions;
     //section = new Rectangle(sourceX, sourceY, dimensions.width, dimensions.height);
     origin      = new Vector2(section.Width / 2, section.Height / 2);
     spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
     model       = LoadTexture();
     if (model != null)
     {
         transformations = new Matrix[model.Bones.Count];
         model.CopyAbsoluteBoneTransformsTo(transformations);
     }
 }
예제 #4
0
 public Drawable(Game game, int sx, int sy, MModel d)
     : base(game)
 {
     displayable = d;
       sourceX = sx;
       sourceY = sy;
       dimensions = displayable.dimensions;
       //section = new Rectangle(sourceX, sourceY, dimensions.width, dimensions.height);
       origin = new Vector2(section.Width / 2, section.Height / 2);
       spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
       model = LoadTexture();
       if (model != null)
       {
     transformations = new Matrix[model.Bones.Count];
     model.CopyAbsoluteBoneTransformsTo(transformations);
       }
 }
예제 #5
0
 public Drawable(Drawable d, MModel m)
     : base(d.Game)
 {
     displayable = m;
     //file = d.file;
     sourceX     = d.sourceX;
     sourceY     = d.sourceY;
     dimensions  = new Dimension(d.dimensions);
     section     = new Rectangle(sourceX, sourceY, dimensions.width, dimensions.height);
     origin      = new Vector2(section.Width / 2, section.Height / 2);
     spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
     model       = d.model;
     if (model != null)
     {
         transformations = new Matrix[model.Bones.Count];
         model.CopyAbsoluteBoneTransformsTo(transformations);
     }
 }
예제 #6
0
 public Drawable(Drawable d, MModel m)
     : base(d.Game)
 {
     displayable = m;
       //file = d.file;
       sourceX = d.sourceX;
       sourceY = d.sourceY;
       dimensions = new Dimension(d.dimensions);
       section = new Rectangle(sourceX, sourceY, dimensions.width, dimensions.height);
       origin = new Vector2(section.Width / 2, section.Height / 2);
       spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
       model = d.model;
       if (model != null)
       {
     transformations = new Matrix[model.Bones.Count];
     model.CopyAbsoluteBoneTransformsTo(transformations);
       }
 }