コード例 #1
0
        /// <summary>
        /// Creates a new drawgroup sprite instance.
        /// </summary>
        /// <param name="type">The type of this sprite.</param>
        /// <param name="flags">The flags for this sprite.</param>
        /// <param name="spriteOffset">The offset of this sprite in the drawgroup (specified in pixels).</param>
        /// <param name="objectOffset">The offset of the object (drawgroup) in the world.</param>
        /// <param name="frame">The spriteframe for this drawgroup sprite.</param>
        public DrawGroupSprite(ushort type, uint flags, PixelOffset spriteOffset, WorldOffset objectOffset, SpriteFrame frame)
        {
            m_Type = type;
            m_Flags = flags;
            m_SpriteOffset = spriteOffset;
            m_ObjectOffset = objectOffset;
            m_Sprite = frame;

            m_Bitmap = (Bitmap)frame.BitmapData.BitMap.Clone();
            if ((m_Flags & 0x1) == 0x1)
            {
                m_Bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX);
            }
        }
コード例 #2
0
        /// <summary>
        /// Creates a new drawgroup sprite instance.
        /// </summary>
        /// <param name="type">The type of this sprite.</param>
        /// <param name="flags">The flags for this sprite.</param>
        /// <param name="spriteOffset">The offset of this sprite in the drawgroup (specified in pixels).</param>
        /// <param name="objectOffset">The offset of the object (drawgroup) in the world.</param>
        /// <param name="frame">The spriteframe for this drawgroup sprite.</param>
        public DrawGroupSprite(ushort type, uint flags, PixelOffset spriteOffset, WorldOffset objectOffset, SpriteFrame frame)
        {
            m_Type         = type;
            m_Flags        = flags;
            m_SpriteOffset = spriteOffset;
            m_ObjectOffset = objectOffset;
            m_Sprite       = frame;

            m_Bitmap = (Bitmap)frame.BitmapData.BitMap.Clone();
            if ((m_Flags & 0x1) == 0x1)
            {
                m_Bitmap.RotateFlip(RotateFlipType.RotateNoneFlipX);
            }
        }