Esempio n. 1
0
        /// <summary>
        /// This function creates a flat colored square image dynamically.
        /// </summary>
        /// <param name="Width">The width of the sprite you want to generate.</param>
        /// <param name="Height">The height of the sprite you want to generate.</param>
        /// <param name="Color">Specifies the color of the generated block.</param>
        /// <returns>This FlxSprite instance (nice for chaining stuff together, if you're into that).</returns>
        public FlxSprite createGraphic(int Width, int Height, Color Color)
        {
            _tex          = FlxG.XnaSheet;
            _stretchToFit = true;
            _facing2d     = Flx2DFacing.NotUsed;

            frameWidth  = 1;
            frameHeight = 1;
            width       = Width;
            height      = Height;
            _color      = Color;
            resetHelpers();
            return(this);
        }
Esempio n. 2
0
        /**
         * This function creates a flat colored square image dynamically.
         *
         * @param	Width		The width of the sprite you want to generate.
         * @param	Height		The height of the sprite you want to generate.
         * @param	Color		Specifies the color of the generated block.
         *
         * @return	This FlxSprite instance (nice for chaining stuff together, if you're into that).
         */
        public FlxSprite createGraphic(int Width, int Height, Color Color)
        {
            _tex = FlxG.XnaSheet;
            _stretchToFit = true;
            _facing2d = Flx2DFacing.NotUsed;

            frameWidth = 1;
            frameHeight = 1;
            width = Width;
            height = Height;
            _color = Color;
            resetHelpers();
            return this;
        }