[英]Get and change radius size of Node - Sprite-Kit
I am using Swift and SpriteKit and I create a new circle (as a Node) like this 我正在使用Swift和SpriteKit,并且像这样创建了一个新的圆(作为Node)
var circlePlayer = SKShapeNode(circleOfRadius: 10)
and I would like to access later on the radius of the circle in order to get its value or modify it (increase it by 1 for instance) - how can I achieve this? 并且我想稍后在圆的半径上访问以获取其值或对其进行修改(例如将其增加1)-如何实现?
Scale it. 缩放比例。
circlePlayer.setScale(2)
Check out: https://developer.apple.com/library/prerelease/ios/documentation/SpriteKit/Reference/SKNode_Ref/index.html#//apple_ref/occ/instm/SKNode/setScale : 检出: https : //developer.apple.com/library/prerelease/ios/documentation/SpriteKit/Reference/SKNode_Ref/index.html#//apple_ref/occ/instm/SKNode/setScale :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.