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);
 }
Beispiel #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));
        }
Beispiel #3
0
 public AnimationWrapper(AnimationWithOffset animation, string palette, bool isPlayerPalette)
 {
     Animation = animation;
     Palette = palette;
     IsPlayerPalette = isPlayerPalette;
 }
Beispiel #4
0
 public void Remove(AnimationWithOffset anim)
 {
     anims.RemoveAll(a => a.Animation == anim);
 }