Example #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);
            }
        }
Example #2
0
        public Tiles(Vector2 Tile_Scale, List <AnimatedSprite2D> Tile, string Tag, string ShortTag, bool Register)
        {
            this.Tile_Scale  = Tile_Scale;
            this.Tile_Sprite = Tile;
            this.Tag         = Tag;
            this.ShortTag    = ShortTag;

            if (Register)
            {
                Log.Info($"[TILES]({this.Tag}) - Has been registered!");
                EEngine.RegisterTile(this);
            }
        }
Example #3
0
        public Tiles(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], false));
            }

            this.Tile_Scale = new Vector2(Section[0].Width, Section[0].Height);
            this.Tile_Sprite.Add(new AnimatedSprite2D(Sprites, Tag));
            this.ShortTag = ShortTag;

            Log.Info($"[TILES]({Tag}) - Has been registered!");
            EEngine.RegisterTile(this);
        }
Example #4
0
        public Tiles(List <List <Rectangle> > Section, Image Image, List <List <string> > SpriteTag, string Tag, string ShortTag)
        {
            List <Sprite2D> Sprites = new List <Sprite2D>();

            for (int i = 0; i < Section.Count; i++)
            {
                for (int j = 0; j < Section[i].Count; j++)
                {
                    Sprites.Add(new Sprite2D(Section[i][j], Image, SpriteTag[i][j], false));
                }
                this.Tile_Sprite.Add(new AnimatedSprite2D(Sprites, Tag));
                Sprites = new List <Sprite2D>();
            }

            this.Tag      = Tag;
            this.ShortTag = ShortTag;

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