我正在尝试在不进行平滑/抗锯齿的情况下缩放 SKSpriteNode 对象(我正在使用像素艺术,因此它看起来更好像素化)。
我需要设置一个属性来执行此操作吗?这是我用来渲染精灵的代码:
SKTextureAtlas *atlas = [SKTextureAtlas atlasNamed:@"objects"];
SKTexture *f1 = [atlas textureNamed:@"hero_1.png"];
SKSpriteNode *hero = [SKSpriteNode spriteNodeWithTexture:f1];
[self addChild: hero];
hero.scale = 6.0f;
图像缩放正确但模糊/平滑。这是 hero_1.png 。