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