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); } }
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(Game game, Texture2D t, string f, int sx, int sy, int w, int h, Model d) : base(game) { displayable = d; file = f; sourceX = sx; sourceY = sy; dimensions = new Dimension(w, h); section = new Rectangle(sourceX, sourceY, dimensions.width, dimensions.height); origin = new Vector2(section.Width / 2, section.Height / 2); texture = t; 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); } }
public Drawable(Game game, string f, int sx, int sy, int w, int h, int d, MModel m) : base(game) { displayable = m; //file = f; sourceX = sx; sourceY = sy; dimensions = new Dimension(w, h, d); 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); } }
public void setDisplayableDimensions(Dimension d) { displayable.dimensions = new Dimension(d); ; }
public void setDimensions(Dimension d) { dimensions = d; }
public GridSquare(Point p) { point = p; dimensions = new Dimension(20, 20); }
public GridSquare(Point p, Bubble b) { point = p; bubble = b; dimensions = new Dimension(b.dimensions); }
public ModelWall(Point p, Dimension d) : base(new Point(p), new Dimension(d)) { }
public MModel(Point p, Dimension d) { position = new Point(p); dimensions = new Dimension(d); velocity = new Velocity(0,0,0); }
public Dimension(Dimension d) { width = d.width; height = d.height; depth = d.depth; }