Example #1
0
 public Sprite(Vector2Object pos, string load_name, World world)
 {
     this.game        = world.game;
     this.world       = world;
     this.pictures[0] = Texture2D.FromStream(game.GraphicsDevice, System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(load_name));
     this.rect        = pos.ConvertToRectangle(picture);
     this.world       = world;
     SetDefaults();
 }
Example #2
0
 public Sprite(Vector2Object pos, Texture2D picture, World world)
 {
     this.game        = world.game;
     this.world       = world;
     this.pictures[0] = picture;
     this.rect        = pos.ConvertToRectangle(picture);
     this.world       = world;
     SetDefaults();
 }
Example #3
0
 public Sprite(Vector2Object pos, List <string> load_names, World world)
 {
     this.game  = world.game;
     this.world = world;
     foreach (String s in load_names)
     {
         this.pictures.Add(Texture2D.FromStream(game.GraphicsDevice, System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(s)));
     }
     this.rect  = pos.ConvertToRectangle(picture);
     this.world = world;
     SetDefaults();
 }
Example #4
0
 public Sprite(Vector2Object pos, List <Texture2D> pictures, World world)
 {
     this.game  = world.game;
     this.world = world;
     foreach (Texture2D t in pictures)
     {
         this.pictures.Add(t);
     }
     this.rect  = pos.ConvertToRectangle(picture);
     this.world = world;
     SetDefaults();
 }