O'Reilly logo

iOS Game Development By Example by Samanyu Chopra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The properties of SKSpriteNode

Let us discuss the properties of SKSpriteNode in the following sections.

Physical

Let us look at some physical properties of SKSpriteNode:

  • size: This property determines the size of a sprite in points. In our GameScene and MenuScene classes, we use this property in the background sprite to cover the screen.
  • AnchorPoint: An anchor point is a point of co-ordinate related to sprite. Say, for example, co-ordinates for each corner of a sprite are (0,0), (1,0), (0,1), and (1,1) representing corners bottom left, bottom right, top left, and top right respectively. These points of reference can be assigned as anchor points to draw a sprite on screen in respect. An assigned anchor point will position a sprite on screen, accordingly. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required