public void Draw(int layer, DrawingBlendingType blendingType) { if (_isActive) { DrawingManager.DrawOnLayer(_drawRequest, layer, blendingType); } }
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; }
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(); }
public TextItem() { _blendingType = DrawingBlendingType.Alpha; this.Tint = Color.White; }
/// <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); }
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); }
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(); }
/// <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); }
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); }