public Drawable(Drawable d, Model 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); texture = d.texture; spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch)); }
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); } }