Ejemplo n.º 1
0
		public override IEnumerable<IRenderable> RenderPreview(World world, ActorInfo building, PaletteReference pr)
		{
			var p = BaseBuildingPreview(world, building, pr);
			var anim = new Animation(world, RenderSprites.GetImage(building), () => 0);
			anim.PlayRepeating("idle-top");

			return p.Concat(anim.Render(WPos.Zero, WVec.Zero, 0, pr, Scale));
		}
Ejemplo n.º 2
0
        public IEnumerable <IRenderable> Render(Actor self, WorldRenderer wr, PaletteReference pal, float scale)
        {
            var center = self.CenterPosition;
            var offset = OffsetFunc != null?OffsetFunc() : WVec.Zero;

            var z = (ZOffset != null) ? ZOffset(center + offset) : 0;

            return(Animation.Render(center, offset, z, pal, scale));
        }
Ejemplo n.º 3
0
        public IRenderable[] Render(Actor self, WorldRenderer wr, PaletteReference pal)
        {
            var center = self.CenterPosition;
            var offset = OffsetFunc?.Invoke() ?? WVec.Zero;

            var z = ZOffset?.Invoke(center + offset) ?? 0;

            return(Animation.Render(center, offset, z, pal));
        }
Ejemplo n.º 4
0
        public IRenderable[] Render(Actor self, WorldRenderer wr, PaletteReference pal, float scale)
        {
            var center = self.CenterPosition;
            var offset = OffsetFunc != null?OffsetFunc() : WVec.Zero;

            var   selfScale   = self.Scale;
            float renderScale = 1f;

            if (selfScale == scale)
            {
                renderScale = 1f;
            }
            else
            {
                renderScale = selfScale;
            }
            var z = (ZOffset != null) ? ZOffset(center + offset) : 0;

            return(Animation.Render(self, center, offset, z, pal, renderScale));
        }