/// <summary>Create a new sprite game object.</summary>
 /// <param name="assetname">The name of the sprite file.</param>
 /// <param name="layer">The layer the object is in.</param>
 /// <param name="id">The ID to refer to the object.</param>
 /// <param name="sheetIndex">The index of the sprite in a sprite string or sheet.</param>
 /// <param name="paralax">The paralax mode that applies to this object.</param>
 public SpriteGameObject(string assetname, int layer = 0, string id = "", int sheetIndex = 0, Backgroundlayer paralax = Backgroundlayer.solid) : base(layer, id)
 {
     if (assetname != "")
         sprite = new SpriteSheet(assetname, sheetIndex);
     else
         sprite = null;
     this.paralax = paralax;
 }    
Example #2
0
 /// <summary>Create a new sprite game object.</summary>
 /// <param name="assetname">The name of the sprite file.</param>
 /// <param name="layer">The layer the object is in.</param>
 /// <param name="id">The ID to refer to the object.</param>
 /// <param name="sheetIndex">The index of the sprite in a sprite string or sheet.</param>
 /// <param name="paralax">The paralax mode that applies to this object.</param>
 public SpriteGameObject(string assetname, int layer = 0, string id = "", int sheetIndex = 0, Backgroundlayer paralax = Backgroundlayer.solid) : base(layer, id)
 {
     if (assetname != "")
     {
         sprite = new SpriteSheet(assetname, sheetIndex);
     }
     else
     {
         sprite = null;
     }
     this.paralax = paralax;
 }
Example #3
0
 /// <summary>Create a new animated game object.</summary>
 /// <param name="paralax">The paralax mode that applies to this object.</param>
 public AnimatedGameObject(int layer = 0, string id = "", Backgroundlayer paralax = Backgroundlayer.solid) : base("", layer, id, 0, paralax)
 {
     animations = new Dictionary <string, Animation>();
 }
 /// <summary>Create a new animated game object.</summary>
 /// <param name="paralax">The paralax mode that applies to this object.</param>
 public AnimatedGameObject(int layer = 0, string id = "", Backgroundlayer paralax = Backgroundlayer.solid) : base("", layer, id, 0, paralax)
 { animations = new Dictionary<string, Animation>(); }