Пример #1
0
        public AnimatedTileLighting(BasicTile tile)
        {
            Position = tile.Position;
            Index    = tile.Index;
            var array = tile.Animations.GetAnimations().Where(a => a.Name.EndsWith("shadow")).ToArray();

            animations = new AnimationCollection(tile.Animations.StartAnimation + "shadow");
            if (array.Length <= 0)
            {
                GameConsole.Warning("Warning: No shadow animations found.");
                return;
            }
            animations.AddAnimations(array);
            tile.Animations.AnimationChanged += AnimationChanged;
        }