示例#1
0
 public void Draw(int layer, DrawingBlendingType blendingType)
 {
     if (_isActive)
     {
         DrawingManager.DrawOnLayer(_drawRequest, layer, blendingType);
     }
 }
示例#2
0
 public Sprite()
     : base()
 {
     _blendingType            = DrawingBlendingType.Alpha;
     _drawRequest             = default(DrawRequest);
     _drawRequest.tint        = Color.White;
     _drawRequest.scaleRatio  = Vector2.One;
     this.MaterialArea        = "";
     _useTilingSafeBorders    = false;
     this.AutoScroll          = false;
     this.AutoScrollSpeed     = 0;
     this.AutoScrollArea      = 0;
     this.AutoScrollVertical  = false;
     this.AutoScrollMirroring = false;
 }
示例#3
0
 public ParticleType()
 {
     _name                          = "New particle type";
     _material                      = IceCream.SceneManager.GlobalDataHolder.GetMaterial("DefaultMaterial");
     _texturePivot                  = new Vector2(0.5f);
     _freeParticles                 = new Queue <Particle>();
     _emissionTimerAccumulator      = 0;
     _useEmitterAngle               = false;
     _keepAspectRatio               = true;
     _attachParticlesToEmitter      = false;
     _blendingType                  = DrawingBlendingType.Alpha;
     _particleOrientationType       = ParticleOrientationType.Fixed;
     _fixedParticleOrientationAngle = 0;
     InitializeValues();
 }
示例#4
0
 public TextItem()
 {
     _blendingType = DrawingBlendingType.Alpha;           
     this.Tint = Color.White;
 }
示例#5
0
文件: Sprite.cs 项目: eickegao/tiny2d
 public Sprite()
     : base()
 {
     _blendingType = DrawingBlendingType.Alpha;           
     _drawRequest = default(DrawRequest);
     _drawRequest.tint = Color.White;
     _drawRequest.scaleRatio = Vector2.One;
     this.MaterialArea = "";
     _useTilingSafeBorders = false;
     this.AutoScroll = false;
     this.AutoScrollSpeed = 0;
     this.AutoScrollArea = 0;
     this.AutoScrollVertical = false;
     this.AutoScrollMirroring = false;
 }
示例#6
0
 /// <summary>
 /// Draw on the requested layer
 /// </summary>
 /// <param name="drawRequest">The drawRequest to render</param>
 /// <param name="layer">The desired layer</param>
 public static void DrawOnLayer(DrawRequest drawRequest, int layer, DrawingBlendingType blendingType)
 {
     _layers[layer - 1].Draw(drawRequest, blendingType);
 }
示例#7
0
        public static void DrawFilledRectangle(int layer, Vector2 position, Vector2 size, Color color, DrawingBlendingType blendingType)
        {
            DrawRequest drawRequest = new DrawRequest(_pixelTexture, position, false, null, 0,
                                                      size, Vector2.Zero, false, color, false, false, null);

            DrawOnLayer(drawRequest, layer, blendingType);
        }
示例#8
0
 public ParticleType()
 {
     _name = "New particle type";
     _material = IceCream.SceneManager.GlobalDataHolder.GetMaterial("DefaultMaterial");
     _texturePivot = new Vector2(0.5f);
     _freeParticles = new Queue<Particle>();
     _emissionTimerAccumulator = 0;
     _useEmitterAngle = false;
     _keepAspectRatio = true;
     _attachParticlesToEmitter = false;
     _blendingType = DrawingBlendingType.Alpha;
     _particleOrientationType = ParticleOrientationType.Fixed;
     _fixedParticleOrientationAngle = 0;
     InitializeValues();            
 }
示例#9
0
 public TextItem()
 {
     _blendingType = DrawingBlendingType.Alpha;
     this.Tint     = Color.White;
 }
示例#10
0
 public void Draw(int layer, DrawingBlendingType blendingType)
 {
     if (_isActive)
     {
         DrawingManager.DrawOnLayer(_drawRequest, layer, blendingType);
     }
 }
示例#11
0
 /// <summary>
 /// Draw a DrawRequest on the specified blending sub layer
 /// </summary>
 /// <param name="drawRequest"></param>
 /// <param name="blendingType"></param>
 public void Draw(DrawRequest drawRequest, DrawingBlendingType blendingType)
 {
     // Forward the request to the correct layer
     _components[(int)blendingType].Draw(drawRequest);
 }
示例#12
0
 /// <summary>
 /// Draw on the requested layer
 /// </summary>
 /// <param name="drawRequest">The drawRequest to render</param>
 /// <param name="layer">The desired layer</param>
 public static void DrawOnLayer(DrawRequest drawRequest, int layer, DrawingBlendingType blendingType)
 {
     _layers[layer - 1].Draw(drawRequest, blendingType);
 }
示例#13
0
 public static void DrawFilledRectangle(int layer, Vector2 position, Vector2 size, Color color, DrawingBlendingType blendingType)
 {
     DrawRequest drawRequest = new DrawRequest(_pixelTexture, position,false, null, 0,
         size, Vector2.Zero, false, color, false, false, null);
     DrawOnLayer(drawRequest, layer, blendingType);
 }
示例#14
0
 /// <summary>
 /// Draw a DrawRequest on the specified blending sub layer
 /// </summary>
 /// <param name="drawRequest"></param>
 /// <param name="blendingType"></param>
 public void Draw(DrawRequest drawRequest, DrawingBlendingType blendingType)
 {
     // Forward the request to the correct layer
     _components[(int)blendingType].Draw(drawRequest);
 }