Ejemplo n.º 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);
       }
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
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);
       }
 }
Ejemplo n.º 5
0
 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);
       }
 }
Ejemplo n.º 6
0
 public void setDisplayableDimensions(Dimension d)
 {
     displayable.dimensions = new Dimension(d); ;
 }
Ejemplo n.º 7
0
 public void setDimensions(Dimension d)
 {
     dimensions = d;
 }
Ejemplo n.º 8
0
 public GridSquare(Point p)
 {
     point = p;
       dimensions = new Dimension(20, 20);
 }
Ejemplo n.º 9
0
 public GridSquare(Point p, Bubble b)
 {
     point = p;
       bubble = b;
       dimensions = new Dimension(b.dimensions);
 }
Ejemplo n.º 10
0
 public ModelWall(Point p, Dimension d)
     : base(new Point(p), new Dimension(d))
 {
 }
Ejemplo n.º 11
0
 public MModel(Point p, Dimension d)
 {
     position = new Point(p);
       dimensions = new Dimension(d);
       velocity = new Velocity(0,0,0);
 }
Ejemplo n.º 12
0
 public Dimension(Dimension d)
 {
     width = d.width;
       height = d.height;
       depth = d.depth;
 }