Questions tagged [sktexture]

An SKTexture object is an image that can be applied to SKSpriteNode objects or particles created by a SKEmitterNode object.

SKTexture is part of , a graphics rendering and animation infrastructure to animate arbitrary textured images, or sprites.

is available on iOS () and OS X ()

145 questions
0
votes
1 answer

SKTexture EXC_BAD_ACCESS

I'm working on a SpriteKit game and trying to allow the user to customize the ship image in the game by colorizing it. I added a category to UIImage that provides the implementation for adjustImage:hue:saturation:brightness. It uses two CIFilters to…
michaelkent94
  • 201
  • 1
  • 8
0
votes
1 answer

SpriteKit crash on run action on other SKScene

I have a crash in interesting form. I setUp SKAction like -(id)initWithSize:(CGSize)size { if (self = [super initWithSize:size]) { self.backgroundColor = [SKColor colorWithWhite:255 alpha:1]; [self createNinja]; …
Roman
  • 366
  • 5
  • 19
0
votes
2 answers

How to replace a SpriteNode with another

What Im Doing: I have bombs being set every few seconds through a repeating Timer, continuously calling the following method. //in my init method SKTexture *Bomb5 = [SKTexture textureWithImageNamed:@"Bomb5.gif"]; SKTexture *Bomb4 =…
4GetFullOf
  • 1,738
  • 4
  • 22
  • 47
0
votes
1 answer

Set size for SKTexture

How do I set a size for a SKTexture Ive gone through the documentation Class Reference I don't see anything about being able to set the size. I know the size method is a return method but just to make it clear what I'm trying to do its in my code…
4GetFullOf
  • 1,738
  • 4
  • 22
  • 47
0
votes
1 answer

SKTexture from UIImage looks different

I'm playing around with SpriteKit and I'm creating a SKTexture from an UIImage, then using SKSpriteNode to add the child to my SKScene (As a background), everything works fine, except that the UIImage looks very different from the original image,…
chroman
  • 1,534
  • 12
  • 18
-1
votes
1 answer

Swift 2.0 - SKSpriteNode's SKTexture sometimes does not show

I have a problem concerning SKSpriteNode Textures that are not drawn to the screen. This problem appeared out of the blue and I took me quite a while to hunt it down to its origin, but I'm still looking for a solution. What I'm doing is simple: I'm…
Warat
  • 1
  • 2
-1
votes
1 answer

SKTexture textureWithImageNamed using too much memory

I'm trying to make a kind of 360° visualizer with spriteKit. In my scene i create a spriteArray = [[NSMutableArray alloc] init]; and i'm filling it in this way: for ( int j=0; j
-2
votes
1 answer

How to get name of object as string in swift 3.0

If my player collides with the drugNode object, I want to change the texture of the animation to the correct image. But I don't know how to get the name of "drugNode". My images are named "pill1", "pill2" and so on func playerCollide(drugNode:…
-2
votes
1 answer

Changing the color of an SKSpriteNode image?

I was wondering if there was a way to change the color of an SKSpriteNode programmatically?? Say I have a texture for an SKSpriteNode that is a box that has a black outline and a white fill color. How would I be able to change the white fill color…
-3
votes
1 answer

Is there a way to update textures in SpriteKit besides Manually changing them?

Changing a SKNodes SKTexture by Node.texture = SKTexture(imagenamed: MyTexture) isn't working, is there another way?
1 2 3
9
10