Exemplo n.º 1
0
 public RenderBuildingWarFactory(ActorInitializer init, RenderBuildingInfo info)
     : base(init, info)
 {
     roof = new Animation(GetImage(init.self));
     var offset = new AnimationWithOffset( roof ) { ZOffset = 24 };
     offset.DisableFunc = () => !buildComplete;
     anims.Add("roof", offset);
 }
Exemplo n.º 2
0
        public void Add(string key, AnimationWithOffset anim, string palette = null, bool isPlayerPalette = false)
        {
            // Use defaults
            if (palette == null)
            {
                palette = info.Palette ?? info.PlayerPalette;
                isPlayerPalette = info.Palette == null;
            }

            anims.Add(key, new AnimationWrapper(anim, palette, isPlayerPalette));
        }
Exemplo n.º 3
0
 public AnimationWrapper(AnimationWithOffset animation, string palette, bool isPlayerPalette)
 {
     Animation = animation;
     Palette = palette;
     IsPlayerPalette = isPlayerPalette;
 }
Exemplo n.º 4
0
 public void Remove(AnimationWithOffset anim)
 {
     anims.RemoveAll(a => a.Animation == anim);
 }