Beispiel #1
0
        public Rectangle(float x, float y, float width, float height)
        {
            Instantiate(x, y, width, height, ref id, ref ptr);

            transform     = Transform.Empty();
            localBounds   = Rectf.Empty();
            globalBounds  = Rectf.Empty();
            textureSource = Rectf.Empty();
            borderFill    = Color.White;
            fill          = Color.White;
        }
Beispiel #2
0
        public Circle(float x, float y, float radius, uint vertices = SmoothCircle)
        {
            transform = Transform.Empty();

            localBounds  = Rectf.Empty();
            globalbounds = Rectf.Empty();

            borderfill = new Color();
            fill       = new Color();

            Instantiate(x, y, radius, vertices, ref id, ref ptr);
        }
Beispiel #3
0
        private void InitializeMembers()
        {
            transform    = Transform.Empty();
            globalbounds = Rectf.Empty();

            toppoint   = Vector2.Zero;
            leftpoint  = Vector2.Zero;
            rightpoint = Vector2.Zero;

            borderfill = new Color();
            fill       = new Color();
        }
Beispiel #4
0
        public Sprite(float x, float y, float width, float height, Texture2D texture)
        {
            transform = Transform.Empty();

            globalbounds  = Rectf.Empty();
            localBounds   = Rectf.Empty();
            textureSource = Rectf.Empty();

            color = new Color();

            Instantiate(x, y, width, height, texture, ref id, ref ptr);
        }
Beispiel #5
0
        public ParticleEmitter(ParticleGenerator generator, Texture2D texture, float x, float y, float width, float height, uint maxParticles)
        {
            this.generator = generator;

            transform = Transform.Empty();

            localBounds   = Rectf.Empty();
            globalbounds  = Rectf.Empty();
            textureSource = Rectf.Empty();

            color = Color.White;

            Instantiate(x, y, width, height, texture, generator, maxParticles, ref id, ref ptr);
        }