示例#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;
        }
示例#2
0
文件: Circle.cs 项目: avuorinen/SaNi
        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);
        }
示例#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();
        }
示例#4
0
文件: Sprite.cs 项目: avuorinen/SaNi
        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);
        }
示例#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);
        }