コード例 #1
0
ファイル: Rectangle.cs プロジェクト: avuorinen/SaNi
        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
ファイル: Triangle.cs プロジェクト: avuorinen/SaNi
        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
ファイル: ParticleEmitter.cs プロジェクト: avuorinen/SaNi
        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);
        }