hi
something
hi
something
| let radius: CGFloat = 150 / 2.0 | |
| let bezierPath = CGMutablePath() | |
| let centerPoint = CGPoint(x: 0, y: 0) | |
| var thisPoint = CGPoint(x: radius, y: 0) | |
| bezierPath.move(to: centerPoint) | |
| var thisAngle: CGFloat = 90 | |
| let unitCount: CGFloat = count | |
| let spacingDegrees: CGFloat = 6.0 | |
| let sliceDegrees: CGFloat = 360.0 / unitCount - spacingDegrees |
| import xmltodict | |
| import time | |
| import hashlib | |
| import os | |
| import cgi | |
| """ | |
| Desired structure based on my post URLS: /data/comments/2016-07-12-post-slug/comment-uniquehash.yml | |
| Data in comment is structured like this: |
| self.entity.ui?.cutscene?.addSequences(sequences: [ | |
| self.bringSpeakersIntoView(), | |
| self.stouWarnsUnderAttack(), | |
| self.delayForTime(time: 4), | |
| self.barricOffersHisTroops(), | |
| self.panCameraForFight(), | |
| self.takeSpeakersOutOfView() | |
| ]) |
| let transfomLayer = SKTransformNode() | |
| let settings = SKSpriteNode(imageNamed:"icon_Settings") | |
| transfomLayer.addChild(settings) | |
| transfomLayer.setEulerAngles(vector_float3(x:120, y:0, z:0)) | |
| transfomLayer.zPosition = 10000 | |
| transfomLayer.position = CGPoint(x:500, y:500) | |
| self.addChild(transfomLayer) | |
| let rotate = SKAction.rotate(byAngle: 6.28, duration: 5) | |
| settings.run(SKAction.repeatForever(rotate)) |
| Leveling Up & UI | |
| - Double confirmation UI pattern (delet save file for an example) | |
| - Unit abilities card shows ability description, and updates unit stats in preview mode | |
| - After battle combat shows more information (still bugs & polish needed) | |
| - You can actually choose a new skill when a unit levels up | |
| - Unit cards now show stars for the units level | |
| - Navigation icons show red circle withnumber when upgrades are available | |
| In Game | |
| - Performance imporvement for sounds (still a major bottleneck though) |
| /// Uses physics equations to calculate position of projectile at given time. | |
| /// This tool is awesome to explain what's happening, and play with sample data: | |
| /// http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra6 | |
| func launchAtPoint(angle:CGFloat, start:CGPoint, end:CGPoint, node:SKNode) -> SKAction { | |
| /// Constants | |
| let gravity : Double = 9.8 | |
| let pixelsToMeters : CGFloat = 50 | |
| /// Calculate everything we can given an angle and an end point |
| /// User clicks on slot one, so we want to create a new save file for that slot | |
| if GameData.sharedInstance.loadGame(saveFile: "One") { | |
| /// An existing save file was there, progress as you need to | |
| } | |
| else { | |
| /// A new save file was created, so start your game from a fresh state | |
| } | |
| /// User buys 100 gold | |
| GameData.sharedInstance.bank += 100 |
| class Level : NSObject, NSCoding { | |
| var highScore : Double = 0 | |
| var completed : Bool = false | |
| var revealed : Bool = false | |
| required init?(coder: NSCoder) { | |
| self.highScore = coder.decodeDouble(forKey: "highScore") |