Пример #1
0
        /// <summary>
        /// For a single Animated Tile in a sprite sheet, using Sprite2D but zeroing out the Position and Scale
        /// </summary>
        public Tiles(AnimatedSprite2D AnimatedSprite, string Tag, string ShortTag, bool Register)
        {
            this.Tile_Sprite.Add(AnimatedSprite);
            this.Tag      = Tag;
            this.ShortTag = ShortTag;

            if (Register)
            {
                Log.Info($"[TILES]({this.Tag}) - Has been registered!");
                EEngine.RegisterTile(this);
            }
        }
Пример #2
0
        public Effects(Vector2 Position, Vector2 Scale, AnimatedSprite2D EffectElement, string Tag, string ShortTag, bool Register)
        {
            this.Position      = Position;
            this.Scale         = Scale;
            this.EffectElement = EffectElement;
            this.Tag           = Tag;
            this.ShortTag      = ShortTag;

            if (Register)
            {
                EEngine.RegisterEffect(this);
                Log.Info($"[EFFECTS]({Tag}) - Has been registered!");
            }
        }
Пример #3
0
        public Effects(List <Rectangle> Section, Image Image, List <string> SpriteTag, string Tag, string ShortTag)
        {
            List <Sprite2D> Sprites = new List <Sprite2D>();

            for (int i = 0; i < Section.Count; i++)
            {
                Sprites.Add(new Sprite2D(Section[i], Image, SpriteTag[i], true));
            }

            this.Scale         = new Vector2(Section[0].Width, Section[0].Height);
            this.EffectElement = new AnimatedSprite2D(Sprites, Tag);
            this.ShortTag      = ShortTag;

            Log.Info($"[EFFECTS]({Tag}) - Has been registered!");
            EEngine.RegisterEffect(this);
        }