コード例 #1
0
ファイル: Texture.cs プロジェクト: slagusev/AndEngine.net
        /**
         * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
         * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
         * @param pTextureOptions the (quality) settings of the Texture.
         * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
         */
        protected void Init(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */
        {
            if (!MathUtils.IsPowerOfTwo(pWidth) || !MathUtils.IsPowerOfTwo(pHeight))
            {
                throw new IllegalArgumentException("Width and Height of a Texture must be a power of 2!");
            }

            this.mWidth                = pWidth;
            this.mHeight               = pHeight;
            this.mTextureOptions       = pTextureOptions;
            this.mTextureStateListener = pTextureStateListener;
        }
コード例 #2
0
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureOptions the (quality) settings of the Texture.
  * @param pTextureStateListener to be informed when this {@link BuildableTexture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public BuildableTexture(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */
     : base(pWidth, pHeight, pTextureOptions, pTextureStateListener)
 {
 }
コード例 #3
0
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureStateListener to be informed when this {@link BuildableTexture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public BuildableTexture(int pWidth, int pHeight, ITextureStateListener pTextureStateListener)
     : base(pWidth, pHeight, TextureOptions.DEFAULT, pTextureStateListener)
 {
 }
コード例 #4
0
ファイル: Texture.cs プロジェクト: slagusev/AndEngine.net
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureOptions the (quality) settings of the Texture.
  * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public Texture(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */
 {
     Init(pWidth, pHeight, pTextureOptions, pTextureStateListener);
 }
コード例 #5
0
ファイル: Texture.cs プロジェクト: slagusev/AndEngine.net
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public Texture(int pWidth, int pHeight, ITextureStateListener pTextureStateListener)
 {
     Init(pWidth, pHeight, TextureOptions.DEFAULT, pTextureStateListener);
 }
コード例 #6
0
ファイル: Texture.cs プロジェクト: jamesburton/AndEngine.net
        /**
         * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
         * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
         * @param pTextureOptions the (quality) settings of the Texture.
         * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
         */
        protected void Init(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */ {
            if (!MathUtils.IsPowerOfTwo(pWidth) || !MathUtils.IsPowerOfTwo(pHeight))
            {
                throw new IllegalArgumentException("Width and Height of a Texture must be a power of 2!");
            }

            this.mWidth = pWidth;
            this.mHeight = pHeight;
            this.mTextureOptions = pTextureOptions;
            this.mTextureStateListener = pTextureStateListener;
        }
コード例 #7
0
ファイル: Texture.cs プロジェクト: jamesburton/AndEngine.net
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureOptions the (quality) settings of the Texture.
  * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public Texture(int pWidth, int pHeight, TextureOptions pTextureOptions, ITextureStateListener pTextureStateListener) /* throws IllegalArgumentException */ {
     Init(pWidth, pHeight, pTextureOptions, pTextureStateListener);
 }
コード例 #8
0
ファイル: Texture.cs プロジェクト: jamesburton/AndEngine.net
 /**
  * @param pWidth must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pHeight must be a power of 2 (i.e. 32, 64, 128, 256, 512, 1024).
  * @param pTextureStateListener to be informed when this {@link Texture} is loaded, unloaded or a {@link ITextureSource} failed to load.
  */
 public Texture(int pWidth, int pHeight, ITextureStateListener pTextureStateListener)
 {
     Init(pWidth, pHeight, TextureOptions.DEFAULT, pTextureStateListener);
 }