Example #1
0
        public Shape2D(Vector2 Position, Vector2 Scale, string Tag)
        {
            this.Position = Position;
            this.Scale    = Scale;
            this.Tag      = Tag;

            Log.Info($"[SHAPE2D]({Tag}) - Has been registered.");
            ExpressedEngine.RegisterShape(this);
        }
Example #2
0
        public Sprite2D(Vector2 Position, Vector2 Scale, string Directory, string Tag)
        {
            this.Position  = Position;
            this.Scale     = Scale;
            this.Directory = Directory;
            this.Tag       = Tag;

            // csharpSpaceInvaders\SpaceInvaders\SpaceInvaders\bin\Debug\Assets\Sprites
            Image  tmp    = Image.FromFile($"Assets/Sprites/{Directory}.png");
            Bitmap sprite = new Bitmap(tmp, (int)this.Scale.X, (int)this.Scale.Y);

            Sprite = sprite;

            Log.Info($"[SPRITE2D]({Tag}) - Has been registered.");
            ExpressedEngine.RegisterSprite(this);
        }
Example #3
0
 public void DestroySelf()
 {
     Log.Info($"[SPRITE2D]({Tag}) - Has been destroyed.");
     ExpressedEngine.UnRegisterSprite(this);
 }