iphone - Float is not convertible to CGFloat and CGFloat is not convertible to Float -


I have a problem with XCode 6 Beta 4, is driving me crazy to develop a game in iOS 8 and I Have followed a tutorial but I get this: The float is not convertible to CGFloat and then when I rearrange the CGFlot, I get another code here:

  Override Function didMoveToView (see: SKView) {your view here / * setup * / // physics self.physicsWorld.gravity = CGVectorMake (0.0, -5.0) ) // Bird Bridesmaid birdTexture = SKTexture (imageNamed: "Kirby") birdTexture.filteringMode = SKTextureFilteringMode.Nearest bird.setScale (0.5) bird.position = CGPoint (X: self.frame.size.width * 0.35, Y: self. frame.size .height * 0.6) bird.physicsBody = SKPhysicsBody (circleOfRadius: bird.size.height / 2) bird.physicsBody.dynamic = true bird.physicsBody.allowsRotation = false self.addChild (bird) // land ground.setScale (2.0) Groundkpojishn = Kgpointmake (Selfksaijkvidth / 2, Groundksaijkhait / 2) Groundkfysiksbody = Skfisiksbody (Rektenglosize: Kgsizemake (Selfkfremksaijkvidth, Groundksaijkhait)) ground.physicsBody .dynamic = false self.addChild (Ground) // // pipes pipes make distance // // pipes movement Dentomov = Sijiflot (Swkfrem. size.width + 2.0 * pipeUp.texture.size () . Width) due to pipe = Skeakshn.amwyueks (-distainti Ofoatt, Y: Sijiflot (0.0), Period: Anstiimintrvl (0.01) * Duritomv) & lt; ----- This is the line problem   

What's going on, I line:

  CGFLOT (self.frame.size.width + 2.0 * Pipette.text.) (Width)   

I get another error, then a restart:

  float (CGFlot (self.frame.size.width + 2.0 * pipip.Tections.) (Width))   

or

  float (self.frame.size.width + 2.0 * pipip.TextSize (). Width)   

gives me first, so what Swift wants is that he is crazy. catch 22? Any help?

EDIT: I am using a 13-inch Mac from late 2009, Intel Core 2 Duo, on Maverix OS X 10.9.4 (13E 28) if any help I saw that the building's Some types of options can affect the float type, but I do not know where they are.

It will be defined as a CGFloat and as you cast it and multiply so NSTimeInterval :

  run pipes = SKAction.moveByX (-distanceToMove, Y: 0.0 duration: NSTimeInterval (0.01) * DistanceToMove)   

Try to multiply for NSTimeInterval :

  Go movePipe = SKAction.moveByX (- DistanceToMove, Y: 0.0, Duration: NSTimeInterval (0.01 * distanceToMove))   

Also, as already suggested, to be cast Not your distance the following will only work properly:

  go distanceToMove = self.frame.size.width + 2.0 * Paipapktektekshn. Size (need). Width    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -