コード例 #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);
 }
コード例 #2
0
ファイル: RenderSprites.cs プロジェクト: RunCraze/OpenRA
        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));
        }
コード例 #3
0
ファイル: RenderSprites.cs プロジェクト: ushardul/OpenRA
 public AnimationWrapper(AnimationWithOffset animation, string palette, bool isPlayerPalette)
 {
     Animation = animation;
     Palette = palette;
     IsPlayerPalette = isPlayerPalette;
 }
コード例 #4
0
ファイル: RenderSprites.cs プロジェクト: ushardul/OpenRA
 public void Remove(AnimationWithOffset anim)
 {
     anims.RemoveAll(a => a.Animation == anim);
 }