Beispiel #1
0
 public Tex2D(int width, int height)
     : base("__internal", (short)0)
 {
     this._base        = new Texture2D(DuckGame.Graphics.device, width, height, false, SurfaceFormat.Color);
     this._frameWidth  = (float)width;
     this._frameHeight = (float)height;
     Content.AssignTextureIndex(this);
 }
Beispiel #2
0
        public static Tex2D getTex2D(Texture2D tex)
        {
            var tex2d = (Tex2D)_Tex2D.Invoke(new object[] { tex, tex.Name, (short)0 });

            Content.AssignTextureIndex(tex2d);

            return(tex2d);
        }