예제 #1
0
        public Shape(Vector2 pos, Vector2 scale, string tag)
        {
            this.pos   = pos;
            this.scale = scale;
            this.tag   = tag;

            Log.INFO($"[Shape] ({tag})  has been registered");
            PieEngine2d.RegisterShape(this);
        }
예제 #2
0
        public Sprite(Vector2 pos, Vector2 scale, string tag, string directory)
        {
            this.pos       = pos;
            this.scale     = scale;
            this.directory = directory;
            this.tag       = tag;

            Image temp = Image.FromFile($"Assets/{directory}");

            sprite = new Bitmap(temp, (int)this.scale.x, (int)this.scale.y);

            Log.INFO($"[Shape] ({tag})  has been registered");
            PieEngine2d.RegisterSprite(this);
        }
예제 #3
0
 public void DestroySelf()
 {
     Log.INFO($"[Shape] ({tag})  has been destroyed");
     PieEngine2d.UnRegisterSprite(this);
 }