├── .gitignore ├── Compiled └── Dino 2016-11-22 20-23-19 │ └── Dino.zip ├── Dino ├── Dino.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Dino │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon_128x128.png │ │ │ ├── icon_128x128@2x.png │ │ │ ├── icon_16x16.png │ │ │ ├── icon_16x16@2x.png │ │ │ ├── icon_256x256.png │ │ │ ├── icon_256x256@2x.png │ │ │ ├── icon_32x32.png │ │ │ ├── icon_32x32@2x.png │ │ │ ├── icon_512x512.png │ │ │ └── icon_512x512@2x.png │ │ ├── Contents.json │ │ ├── DinoSprite.imageset │ │ │ ├── Contents.json │ │ │ └── Dino2@2x.png │ │ └── Obstacle.imageset │ │ │ ├── Contents.json │ │ │ └── Obstacle@2x.png │ ├── Base.lproj │ │ └── Main.storyboard │ ├── DinoScene.swift │ ├── DinoView.swift │ ├── Info.plist │ ├── ViewController.swift │ └── WindowController.swift ├── DinoTests │ ├── DinoTests.swift │ └── Info.plist └── DinoUITests │ ├── DinoUITests.swift │ └── Info.plist ├── GitHub ├── play.gif └── poster.png ├── LICENSE ├── README.md └── Resources ├── Dino2.psd ├── Dino2@2x.png ├── DinoMask.png ├── DinoMask.psd ├── DinoSprite.png ├── DinoSprite.psd ├── DinoSprite@2x.png ├── Icon.png ├── Icon.psd ├── New icon.iconset ├── icon_128x128.png ├── icon_128x128@2x.png ├── icon_16x16.png ├── icon_16x16@2x.png ├── icon_256x256.png ├── icon_256x256@2x.png ├── icon_32x32.png ├── icon_32x32@2x.png ├── icon_512x512.png └── icon_512x512@2x.png ├── Obstacle.psd └── Obstacle@2x.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### OSX ### 4 | .DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must end with two \r 9 | Icon 10 | 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear in the root of a volume 16 | .DocumentRevisions-V100 17 | .fseventsd 18 | .Spotlight-V100 19 | .TemporaryItems 20 | .Trashes 21 | .VolumeIcon.icns 22 | 23 | # Directories potentially created on remote AFP share 24 | .AppleDB 25 | .AppleDesktop 26 | Network Trash Folder 27 | Temporary Items 28 | .apdisk 29 | 30 | 31 | ### Xcode ### 32 | build/ 33 | *.pbxuser 34 | !default.pbxuser 35 | *.mode1v3 36 | !default.mode1v3 37 | *.mode2v3 38 | !default.mode2v3 39 | *.perspectivev3 40 | !default.perspectivev3 41 | xcuserdata 42 | *.xccheckout 43 | *.moved-aside 44 | DerivedData 45 | *.xcuserstate 46 | 47 | 48 | ### Objective-C ### 49 | # Xcode 50 | # 51 | build/ 52 | *.pbxuser 53 | !default.pbxuser 54 | *.mode1v3 55 | !default.mode1v3 56 | *.mode2v3 57 | !default.mode2v3 58 | *.perspectivev3 59 | !default.perspectivev3 60 | xcuserdata 61 | *.xccheckout 62 | *.moved-aside 63 | DerivedData 64 | *.hmap 65 | *.ipa 66 | *.xcuserstate 67 | 68 | # CocoaPods 69 | # 70 | # We recommend against adding the Pods directory to your .gitignore. However 71 | # you should judge for yourself, the pros and cons are mentioned at: 72 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 73 | # 74 | #Pods/ 75 | -------------------------------------------------------------------------------- /Compiled/Dino 2016-11-22 20-23-19/Dino.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Compiled/Dino 2016-11-22 20-23-19/Dino.zip -------------------------------------------------------------------------------- /Dino/Dino.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 186582C41DE3B86D000BDDD7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582C31DE3B86D000BDDD7 /* AppDelegate.swift */; }; 11 | 186582C61DE3B86D000BDDD7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582C51DE3B86D000BDDD7 /* ViewController.swift */; }; 12 | 186582C81DE3B86D000BDDD7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 186582C71DE3B86D000BDDD7 /* Assets.xcassets */; }; 13 | 186582CB1DE3B86E000BDDD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 186582C91DE3B86E000BDDD7 /* Main.storyboard */; }; 14 | 186582D61DE3B86E000BDDD7 /* DinoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582D51DE3B86E000BDDD7 /* DinoTests.swift */; }; 15 | 186582E11DE3B86E000BDDD7 /* DinoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582E01DE3B86E000BDDD7 /* DinoUITests.swift */; }; 16 | 186582EF1DE3BC00000BDDD7 /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582EE1DE3BC00000BDDD7 /* WindowController.swift */; }; 17 | 186582F41DE4A9FC000BDDD7 /* SpriteKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186582F31DE4A9FC000BDDD7 /* SpriteKit.framework */; }; 18 | 186582F61DE4C4B1000BDDD7 /* DinoScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582F51DE4C4B1000BDDD7 /* DinoScene.swift */; }; 19 | 186582F81DE4C616000BDDD7 /* DinoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 186582F71DE4C616000BDDD7 /* DinoView.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 186582D21DE3B86E000BDDD7 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 186582B81DE3B86D000BDDD7 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 186582BF1DE3B86D000BDDD7; 28 | remoteInfo = Dino; 29 | }; 30 | 186582DD1DE3B86E000BDDD7 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 186582B81DE3B86D000BDDD7 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 186582BF1DE3B86D000BDDD7; 35 | remoteInfo = Dino; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 186582C01DE3B86D000BDDD7 /* Dino.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Dino.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 186582C31DE3B86D000BDDD7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 42 | 186582C51DE3B86D000BDDD7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 43 | 186582C71DE3B86D000BDDD7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 44 | 186582CA1DE3B86E000BDDD7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 186582CC1DE3B86E000BDDD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 186582D11DE3B86E000BDDD7 /* DinoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DinoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 186582D51DE3B86E000BDDD7 /* DinoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DinoTests.swift; sourceTree = ""; }; 48 | 186582D71DE3B86E000BDDD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 186582DC1DE3B86E000BDDD7 /* DinoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DinoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 186582E01DE3B86E000BDDD7 /* DinoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DinoUITests.swift; sourceTree = ""; }; 51 | 186582E21DE3B86E000BDDD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 186582EE1DE3BC00000BDDD7 /* WindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WindowController.swift; sourceTree = ""; }; 53 | 186582F31DE4A9FC000BDDD7 /* SpriteKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SpriteKit.framework; path = System/Library/Frameworks/SpriteKit.framework; sourceTree = SDKROOT; }; 54 | 186582F51DE4C4B1000BDDD7 /* DinoScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DinoScene.swift; sourceTree = ""; }; 55 | 186582F71DE4C616000BDDD7 /* DinoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DinoView.swift; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 186582BD1DE3B86D000BDDD7 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 186582F41DE4A9FC000BDDD7 /* SpriteKit.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 186582CE1DE3B86E000BDDD7 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 186582D91DE3B86E000BDDD7 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 186582B71DE3B86D000BDDD7 = { 85 | isa = PBXGroup; 86 | children = ( 87 | 186582C21DE3B86D000BDDD7 /* Dino */, 88 | 186582D41DE3B86E000BDDD7 /* DinoTests */, 89 | 186582DF1DE3B86E000BDDD7 /* DinoUITests */, 90 | 186582C11DE3B86D000BDDD7 /* Products */, 91 | 186582F21DE4A9FC000BDDD7 /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 186582C11DE3B86D000BDDD7 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 186582C01DE3B86D000BDDD7 /* Dino.app */, 99 | 186582D11DE3B86E000BDDD7 /* DinoTests.xctest */, 100 | 186582DC1DE3B86E000BDDD7 /* DinoUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 186582C21DE3B86D000BDDD7 /* Dino */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 186582C31DE3B86D000BDDD7 /* AppDelegate.swift */, 109 | 186582EE1DE3BC00000BDDD7 /* WindowController.swift */, 110 | 186582C51DE3B86D000BDDD7 /* ViewController.swift */, 111 | 186582F71DE4C616000BDDD7 /* DinoView.swift */, 112 | 186582F51DE4C4B1000BDDD7 /* DinoScene.swift */, 113 | 186582C71DE3B86D000BDDD7 /* Assets.xcassets */, 114 | 186582C91DE3B86E000BDDD7 /* Main.storyboard */, 115 | 186582CC1DE3B86E000BDDD7 /* Info.plist */, 116 | ); 117 | path = Dino; 118 | sourceTree = ""; 119 | }; 120 | 186582D41DE3B86E000BDDD7 /* DinoTests */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 186582D51DE3B86E000BDDD7 /* DinoTests.swift */, 124 | 186582D71DE3B86E000BDDD7 /* Info.plist */, 125 | ); 126 | path = DinoTests; 127 | sourceTree = ""; 128 | }; 129 | 186582DF1DE3B86E000BDDD7 /* DinoUITests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 186582E01DE3B86E000BDDD7 /* DinoUITests.swift */, 133 | 186582E21DE3B86E000BDDD7 /* Info.plist */, 134 | ); 135 | path = DinoUITests; 136 | sourceTree = ""; 137 | }; 138 | 186582F21DE4A9FC000BDDD7 /* Frameworks */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 186582F31DE4A9FC000BDDD7 /* SpriteKit.framework */, 142 | ); 143 | name = Frameworks; 144 | sourceTree = ""; 145 | }; 146 | /* End PBXGroup section */ 147 | 148 | /* Begin PBXNativeTarget section */ 149 | 186582BF1DE3B86D000BDDD7 /* Dino */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 186582E51DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "Dino" */; 152 | buildPhases = ( 153 | 186582BC1DE3B86D000BDDD7 /* Sources */, 154 | 186582BD1DE3B86D000BDDD7 /* Frameworks */, 155 | 186582BE1DE3B86D000BDDD7 /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | ); 161 | name = Dino; 162 | productName = Dino; 163 | productReference = 186582C01DE3B86D000BDDD7 /* Dino.app */; 164 | productType = "com.apple.product-type.application"; 165 | }; 166 | 186582D01DE3B86E000BDDD7 /* DinoTests */ = { 167 | isa = PBXNativeTarget; 168 | buildConfigurationList = 186582E81DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "DinoTests" */; 169 | buildPhases = ( 170 | 186582CD1DE3B86E000BDDD7 /* Sources */, 171 | 186582CE1DE3B86E000BDDD7 /* Frameworks */, 172 | 186582CF1DE3B86E000BDDD7 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | 186582D31DE3B86E000BDDD7 /* PBXTargetDependency */, 178 | ); 179 | name = DinoTests; 180 | productName = DinoTests; 181 | productReference = 186582D11DE3B86E000BDDD7 /* DinoTests.xctest */; 182 | productType = "com.apple.product-type.bundle.unit-test"; 183 | }; 184 | 186582DB1DE3B86E000BDDD7 /* DinoUITests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 186582EB1DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "DinoUITests" */; 187 | buildPhases = ( 188 | 186582D81DE3B86E000BDDD7 /* Sources */, 189 | 186582D91DE3B86E000BDDD7 /* Frameworks */, 190 | 186582DA1DE3B86E000BDDD7 /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | 186582DE1DE3B86E000BDDD7 /* PBXTargetDependency */, 196 | ); 197 | name = DinoUITests; 198 | productName = DinoUITests; 199 | productReference = 186582DC1DE3B86E000BDDD7 /* DinoUITests.xctest */; 200 | productType = "com.apple.product-type.bundle.ui-testing"; 201 | }; 202 | /* End PBXNativeTarget section */ 203 | 204 | /* Begin PBXProject section */ 205 | 186582B81DE3B86D000BDDD7 /* Project object */ = { 206 | isa = PBXProject; 207 | attributes = { 208 | LastSwiftUpdateCheck = 0810; 209 | LastUpgradeCheck = 0810; 210 | ORGANIZATIONNAME = "Yuhui Li"; 211 | TargetAttributes = { 212 | 186582BF1DE3B86D000BDDD7 = { 213 | CreatedOnToolsVersion = 8.1; 214 | DevelopmentTeam = ZET9SZ3EH2; 215 | ProvisioningStyle = Automatic; 216 | }; 217 | 186582D01DE3B86E000BDDD7 = { 218 | CreatedOnToolsVersion = 8.1; 219 | DevelopmentTeam = ZET9SZ3EH2; 220 | ProvisioningStyle = Automatic; 221 | TestTargetID = 186582BF1DE3B86D000BDDD7; 222 | }; 223 | 186582DB1DE3B86E000BDDD7 = { 224 | CreatedOnToolsVersion = 8.1; 225 | DevelopmentTeam = ZET9SZ3EH2; 226 | ProvisioningStyle = Automatic; 227 | TestTargetID = 186582BF1DE3B86D000BDDD7; 228 | }; 229 | }; 230 | }; 231 | buildConfigurationList = 186582BB1DE3B86D000BDDD7 /* Build configuration list for PBXProject "Dino" */; 232 | compatibilityVersion = "Xcode 3.2"; 233 | developmentRegion = English; 234 | hasScannedForEncodings = 0; 235 | knownRegions = ( 236 | en, 237 | Base, 238 | ); 239 | mainGroup = 186582B71DE3B86D000BDDD7; 240 | productRefGroup = 186582C11DE3B86D000BDDD7 /* Products */; 241 | projectDirPath = ""; 242 | projectRoot = ""; 243 | targets = ( 244 | 186582BF1DE3B86D000BDDD7 /* Dino */, 245 | 186582D01DE3B86E000BDDD7 /* DinoTests */, 246 | 186582DB1DE3B86E000BDDD7 /* DinoUITests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXResourcesBuildPhase section */ 252 | 186582BE1DE3B86D000BDDD7 /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | 186582C81DE3B86D000BDDD7 /* Assets.xcassets in Resources */, 257 | 186582CB1DE3B86E000BDDD7 /* Main.storyboard in Resources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | 186582CF1DE3B86E000BDDD7 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | 186582DA1DE3B86E000BDDD7 /* Resources */ = { 269 | isa = PBXResourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | /* End PBXResourcesBuildPhase section */ 276 | 277 | /* Begin PBXSourcesBuildPhase section */ 278 | 186582BC1DE3B86D000BDDD7 /* Sources */ = { 279 | isa = PBXSourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | 186582F81DE4C616000BDDD7 /* DinoView.swift in Sources */, 283 | 186582C61DE3B86D000BDDD7 /* ViewController.swift in Sources */, 284 | 186582EF1DE3BC00000BDDD7 /* WindowController.swift in Sources */, 285 | 186582C41DE3B86D000BDDD7 /* AppDelegate.swift in Sources */, 286 | 186582F61DE4C4B1000BDDD7 /* DinoScene.swift in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 186582CD1DE3B86E000BDDD7 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 186582D61DE3B86E000BDDD7 /* DinoTests.swift in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | 186582D81DE3B86E000BDDD7 /* Sources */ = { 299 | isa = PBXSourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | 186582E11DE3B86E000BDDD7 /* DinoUITests.swift in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | /* End PBXSourcesBuildPhase section */ 307 | 308 | /* Begin PBXTargetDependency section */ 309 | 186582D31DE3B86E000BDDD7 /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = 186582BF1DE3B86D000BDDD7 /* Dino */; 312 | targetProxy = 186582D21DE3B86E000BDDD7 /* PBXContainerItemProxy */; 313 | }; 314 | 186582DE1DE3B86E000BDDD7 /* PBXTargetDependency */ = { 315 | isa = PBXTargetDependency; 316 | target = 186582BF1DE3B86D000BDDD7 /* Dino */; 317 | targetProxy = 186582DD1DE3B86E000BDDD7 /* PBXContainerItemProxy */; 318 | }; 319 | /* End PBXTargetDependency section */ 320 | 321 | /* Begin PBXVariantGroup section */ 322 | 186582C91DE3B86E000BDDD7 /* Main.storyboard */ = { 323 | isa = PBXVariantGroup; 324 | children = ( 325 | 186582CA1DE3B86E000BDDD7 /* Base */, 326 | ); 327 | name = Main.storyboard; 328 | sourceTree = ""; 329 | }; 330 | /* End PBXVariantGroup section */ 331 | 332 | /* Begin XCBuildConfiguration section */ 333 | 186582E31DE3B86E000BDDD7 /* Debug */ = { 334 | isa = XCBuildConfiguration; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_CONSTANT_CONVERSION = YES; 344 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 345 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 346 | CLANG_WARN_EMPTY_BODY = YES; 347 | CLANG_WARN_ENUM_CONVERSION = YES; 348 | CLANG_WARN_INFINITE_RECURSION = YES; 349 | CLANG_WARN_INT_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 352 | CLANG_WARN_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | CODE_SIGN_IDENTITY = "-"; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = dwarf; 357 | ENABLE_STRICT_OBJC_MSGSEND = YES; 358 | ENABLE_TESTABILITY = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_DYNAMIC_NO_PIC = NO; 361 | GCC_NO_COMMON_BLOCKS = YES; 362 | GCC_OPTIMIZATION_LEVEL = 0; 363 | GCC_PREPROCESSOR_DEFINITIONS = ( 364 | "DEBUG=1", 365 | "$(inherited)", 366 | ); 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | MACOSX_DEPLOYMENT_TARGET = 10.12; 374 | MTL_ENABLE_DEBUG_INFO = YES; 375 | ONLY_ACTIVE_ARCH = YES; 376 | SDKROOT = macosx; 377 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 378 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 379 | }; 380 | name = Debug; 381 | }; 382 | 186582E41DE3B86E000BDDD7 /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_ANALYZER_NONNULL = YES; 387 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 388 | CLANG_CXX_LIBRARY = "libc++"; 389 | CLANG_ENABLE_MODULES = YES; 390 | CLANG_ENABLE_OBJC_ARC = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_CONSTANT_CONVERSION = YES; 393 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 394 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 395 | CLANG_WARN_EMPTY_BODY = YES; 396 | CLANG_WARN_ENUM_CONVERSION = YES; 397 | CLANG_WARN_INFINITE_RECURSION = YES; 398 | CLANG_WARN_INT_CONVERSION = YES; 399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 400 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 401 | CLANG_WARN_UNREACHABLE_CODE = YES; 402 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 403 | CODE_SIGN_IDENTITY = "-"; 404 | COPY_PHASE_STRIP = NO; 405 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 406 | ENABLE_NS_ASSERTIONS = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu99; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | MACOSX_DEPLOYMENT_TARGET = 10.12; 417 | MTL_ENABLE_DEBUG_INFO = NO; 418 | SDKROOT = macosx; 419 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 420 | }; 421 | name = Release; 422 | }; 423 | 186582E61DE3B86E000BDDD7 /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 427 | COMBINE_HIDPI_IMAGES = YES; 428 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 429 | INFOPLIST_FILE = Dino/Info.plist; 430 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 431 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.Dino; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | SWIFT_VERSION = 3.0; 434 | }; 435 | name = Debug; 436 | }; 437 | 186582E71DE3B86E000BDDD7 /* Release */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | COMBINE_HIDPI_IMAGES = YES; 442 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 443 | INFOPLIST_FILE = Dino/Info.plist; 444 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 445 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.Dino; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | SWIFT_VERSION = 3.0; 448 | }; 449 | name = Release; 450 | }; 451 | 186582E91DE3B86E000BDDD7 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 455 | BUNDLE_LOADER = "$(TEST_HOST)"; 456 | COMBINE_HIDPI_IMAGES = YES; 457 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 458 | INFOPLIST_FILE = DinoTests/Info.plist; 459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 460 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.DinoTests; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | SWIFT_VERSION = 3.0; 463 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dino.app/Contents/MacOS/Dino"; 464 | }; 465 | name = Debug; 466 | }; 467 | 186582EA1DE3B86E000BDDD7 /* Release */ = { 468 | isa = XCBuildConfiguration; 469 | buildSettings = { 470 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 471 | BUNDLE_LOADER = "$(TEST_HOST)"; 472 | COMBINE_HIDPI_IMAGES = YES; 473 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 474 | INFOPLIST_FILE = DinoTests/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 476 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.DinoTests; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | SWIFT_VERSION = 3.0; 479 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dino.app/Contents/MacOS/Dino"; 480 | }; 481 | name = Release; 482 | }; 483 | 186582EC1DE3B86E000BDDD7 /* Debug */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 487 | COMBINE_HIDPI_IMAGES = YES; 488 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 489 | INFOPLIST_FILE = DinoUITests/Info.plist; 490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 491 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.DinoUITests; 492 | PRODUCT_NAME = "$(TARGET_NAME)"; 493 | SWIFT_VERSION = 3.0; 494 | TEST_TARGET_NAME = Dino; 495 | }; 496 | name = Debug; 497 | }; 498 | 186582ED1DE3B86E000BDDD7 /* Release */ = { 499 | isa = XCBuildConfiguration; 500 | buildSettings = { 501 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 502 | COMBINE_HIDPI_IMAGES = YES; 503 | DEVELOPMENT_TEAM = ZET9SZ3EH2; 504 | INFOPLIST_FILE = DinoUITests/Info.plist; 505 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 506 | PRODUCT_BUNDLE_IDENTIFIER = com.yuhuili.DinoUITests; 507 | PRODUCT_NAME = "$(TARGET_NAME)"; 508 | SWIFT_VERSION = 3.0; 509 | TEST_TARGET_NAME = Dino; 510 | }; 511 | name = Release; 512 | }; 513 | /* End XCBuildConfiguration section */ 514 | 515 | /* Begin XCConfigurationList section */ 516 | 186582BB1DE3B86D000BDDD7 /* Build configuration list for PBXProject "Dino" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | 186582E31DE3B86E000BDDD7 /* Debug */, 520 | 186582E41DE3B86E000BDDD7 /* Release */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | defaultConfigurationName = Release; 524 | }; 525 | 186582E51DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "Dino" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 186582E61DE3B86E000BDDD7 /* Debug */, 529 | 186582E71DE3B86E000BDDD7 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | 186582E81DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "DinoTests" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | 186582E91DE3B86E000BDDD7 /* Debug */, 538 | 186582EA1DE3B86E000BDDD7 /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | 186582EB1DE3B86E000BDDD7 /* Build configuration list for PBXNativeTarget "DinoUITests" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | 186582EC1DE3B86E000BDDD7 /* Debug */, 547 | 186582ED1DE3B86E000BDDD7 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | /* End XCConfigurationList section */ 553 | }; 554 | rootObject = 186582B81DE3B86D000BDDD7 /* Project object */; 555 | } 556 | -------------------------------------------------------------------------------- /Dino/Dino.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Dino/Dino/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Dino 4 | // 5 | // Created by Yuhui Li on 2016-11-21. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | func applicationDidFinishLaunching(_ aNotification: Notification) { 16 | // Insert code here to initialize your application 17 | if #available(OSX 10.12.2, *) { 18 | NSApplication.shared().isAutomaticCustomizeTouchBarMenuItemEnabled = true 19 | } 20 | } 21 | 22 | func applicationWillTerminate(_ aNotification: Notification) { 23 | // Insert code here to tear down your application 24 | } 25 | 26 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 27 | return true 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/DinoSprite.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Dino2@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/DinoSprite.imageset/Dino2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/DinoSprite.imageset/Dino2@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/Obstacle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Obstacle@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Dino/Dino/Assets.xcassets/Obstacle.imageset/Obstacle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Dino/Dino/Assets.xcassets/Obstacle.imageset/Obstacle@2x.png -------------------------------------------------------------------------------- /Dino/Dino/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Dino/Dino/DinoScene.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DinoScene.swift 3 | // Dino 4 | // 5 | // Created by Yuhui Li on 2016-11-22. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import SpriteKit 11 | 12 | struct PhysicsCategory { 13 | static let None: UInt32 = 0 14 | static let All: UInt32 = UInt32.max 15 | static let Edge: UInt32 = 0b1 16 | static let Character: UInt32 = 0b10 17 | static let Collider: UInt32 = 0b100 18 | static let Obstacle: UInt32 = 0b1000 19 | } 20 | 21 | class DinoScene: SKScene, SKPhysicsContactDelegate { 22 | 23 | var sceneCreated = false 24 | var gameStarted = false 25 | var canJump = false 26 | var shouldSpawnObstacle = false 27 | var shouldUpdateScore = false 28 | 29 | let dinoDarkColor = SKColor(red: 83/255.0, green: 83/255.0, blue: 83/255.0, alpha: 1) 30 | 31 | let titleNode = SKLabelNode(fontNamed: "Courier") 32 | let subtitleNode = SKLabelNode(fontNamed: "Courier") 33 | let scoreNode = SKLabelNode(fontNamed: "Courier") 34 | let dinoSpriteNode = SKSpriteNode(imageNamed: "DinoSprite") 35 | let bottomCollider: SKPhysicsBody = SKPhysicsBody(edgeFrom: CGPoint(x: 0, y:0), to: CGPoint(x:1005, y:0)) 36 | 37 | var currentScore = 0 38 | 39 | override func didMove(to view: SKView) { 40 | if !sceneCreated { 41 | sceneCreated = true 42 | createSceneContents() 43 | } 44 | } 45 | 46 | func startGame() { 47 | srand48(Int(arc4random())) 48 | 49 | for node in self.children { 50 | if (node.physicsBody?.categoryBitMask == PhysicsCategory.Obstacle) { 51 | self.removeChildren(in: [node]) 52 | } 53 | } 54 | 55 | gameStarted = true 56 | canJump = true 57 | currentScore = 0 58 | shouldUpdateScore = true 59 | updateScore() 60 | titleNode.isHidden = true 61 | subtitleNode.isHidden = true 62 | self.shouldSpawnObstacle = true 63 | self.spawnObstacle() 64 | } 65 | 66 | func createSceneContents() { 67 | self.addChild(titleLabel()) 68 | self.addChild(subtitleLabel()) 69 | self.addChild(dinoSprite()) 70 | self.addChild(scoreLabel()) 71 | self.physicsWorld.contactDelegate = self 72 | self.backgroundColor = SKColor.lightGray 73 | //self.scaleMode = .aspectFit 74 | 75 | self.physicsBody = bottomCollider 76 | bottomCollider.categoryBitMask = PhysicsCategory.Edge | PhysicsCategory.Collider 77 | bottomCollider.contactTestBitMask = PhysicsCategory.Character 78 | bottomCollider.friction = 0 79 | bottomCollider.restitution = 0 80 | bottomCollider.linearDamping = 0 81 | bottomCollider.angularDamping = 1 82 | bottomCollider.isDynamic = false 83 | bottomCollider.affectedByGravity = false 84 | bottomCollider.allowsRotation = false 85 | 86 | self.physicsWorld.gravity = CGVector(dx: 0.0, dy: -9.8) 87 | 88 | //self.logger() 89 | self.spawnObstacle() 90 | } 91 | 92 | func titleLabel() -> SKLabelNode { 93 | titleNode.text = "TouchBarDino" 94 | titleNode.fontSize = 10 95 | titleNode.position = CGPoint(x: self.frame.midX, y: self.frame.midY) 96 | titleNode.fontColor = dinoDarkColor 97 | titleNode.zPosition = 50 98 | 99 | return titleNode 100 | } 101 | 102 | func subtitleLabel() -> SKLabelNode { 103 | subtitleNode.text = "Touch anywhere to begin..." 104 | subtitleNode.fontSize = 7 105 | subtitleNode.position = CGPoint(x: self.frame.midX, y: self.frame.midY-10) 106 | subtitleNode.fontColor = dinoDarkColor 107 | subtitleNode.zPosition = 50 108 | 109 | return subtitleNode 110 | } 111 | 112 | func scoreLabel() -> SKLabelNode { 113 | scoreNode.text = generateScore() 114 | scoreNode.fontSize = 13 115 | scoreNode.horizontalAlignmentMode = .right 116 | scoreNode.position = CGPoint(x: self.frame.maxX - 4, y:self.frame.midY + 2) 117 | scoreNode.fontColor = dinoDarkColor 118 | scoreNode.zPosition = 80 119 | 120 | return scoreNode 121 | } 122 | 123 | func generateScore() -> String { 124 | return String(format: "%07d", currentScore) 125 | } 126 | 127 | func dinoSprite() -> SKSpriteNode { 128 | dinoSpriteNode.setScale(0.5) 129 | dinoSpriteNode.position = CGPoint(x: 20, y: 40) 130 | dinoSpriteNode.physicsBody = SKPhysicsBody(rectangleOf: dinoSpriteNode.size) 131 | if let pb = dinoSpriteNode.physicsBody { 132 | pb.isDynamic = true 133 | pb.affectedByGravity = true 134 | pb.allowsRotation = false 135 | pb.categoryBitMask = PhysicsCategory.Character 136 | pb.collisionBitMask = PhysicsCategory.Edge 137 | pb.contactTestBitMask = PhysicsCategory.Collider 138 | pb.restitution = 0 139 | pb.friction = 1 140 | pb.linearDamping = 1 141 | pb.angularDamping = 1 142 | } 143 | return dinoSpriteNode 144 | } 145 | 146 | func endGame() { 147 | 148 | titleNode.isHidden = false 149 | subtitleNode.isHidden = false 150 | 151 | canJump = false 152 | shouldSpawnObstacle = false 153 | gameStarted = false 154 | shouldUpdateScore = false 155 | for node in self.children { 156 | if (node.physicsBody?.categoryBitMask == PhysicsCategory.Obstacle) { 157 | node.physicsBody?.velocity = CGVector(dx:0, dy:0) 158 | } 159 | } 160 | } 161 | 162 | func jump() { 163 | 164 | if !gameStarted { 165 | startGame() 166 | } 167 | 168 | if !canJump { 169 | return 170 | } 171 | 172 | if let pb = dinoSpriteNode.physicsBody { 173 | pb.applyImpulse(CGVector(dx:0, dy:8.8), at: dinoSpriteNode.position) 174 | } 175 | } 176 | 177 | func spawnObstacle() { 178 | if self.shouldSpawnObstacle == false { 179 | return 180 | } 181 | 182 | let x = arc4random() % 3; 183 | 184 | if x != 2 { 185 | let ob = SKSpriteNode(imageNamed: "Obstacle") 186 | ob.setScale(CGFloat(drand48() * 0.2 + 0.3)) 187 | ob.position = CGPoint(x: 1020, y: ob.size.height/2) 188 | ob.physicsBody = SKPhysicsBody(texture: SKTexture(imageNamed: "Obstacle"), size: ob.size) 189 | if let pb = ob.physicsBody { 190 | pb.isDynamic = true 191 | pb.affectedByGravity = false 192 | pb.allowsRotation = false 193 | pb.categoryBitMask = PhysicsCategory.Obstacle 194 | pb.contactTestBitMask = PhysicsCategory.Character 195 | pb.collisionBitMask = 0 196 | pb.restitution = 0 197 | pb.friction = 0 198 | pb.linearDamping = 0 199 | pb.angularDamping = 0 200 | pb.velocity = CGVector(dx: -160, dy: 0) 201 | } 202 | self.addChild(ob) 203 | 204 | DispatchQueue.main.asyncAfter(deadline: .now() + 14.0, execute: { 205 | if self.shouldSpawnObstacle { 206 | self.removeChildren(in: [ob]) 207 | } 208 | }) 209 | } 210 | 211 | 212 | let randDelay = drand48() * 0.3 - Double(currentScore) / 1000.0 213 | 214 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.6 + randDelay, execute: { 215 | if self.shouldSpawnObstacle == true { 216 | self.spawnObstacle() 217 | } 218 | }) 219 | } 220 | 221 | func updateScore() { 222 | currentScore += 1 223 | scoreNode.text = generateScore() 224 | 225 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: { 226 | if (self.shouldUpdateScore) { 227 | self.updateScore() 228 | } 229 | }) 230 | } 231 | 232 | func didBegin(_ contact: SKPhysicsContact) { 233 | if (contact.bodyA == dinoSpriteNode.physicsBody && contact.bodyB == bottomCollider) || 234 | (contact.bodyB == dinoSpriteNode.physicsBody && contact.bodyA == bottomCollider) { 235 | canJump = true 236 | } 237 | } 238 | 239 | func didEnd(_ contact: SKPhysicsContact) { 240 | if (contact.bodyA == dinoSpriteNode.physicsBody && contact.bodyB == bottomCollider) || 241 | (contact.bodyB == dinoSpriteNode.physicsBody && contact.bodyA == bottomCollider) { 242 | canJump = false 243 | } else { 244 | endGame() 245 | } 246 | } 247 | 248 | func logger() { 249 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3, execute: { 250 | NSLog("Sprite at: %f, %f", self.dinoSpriteNode.position.x, self.dinoSpriteNode.position.y) 251 | self.logger() 252 | }) 253 | } 254 | 255 | 256 | } 257 | -------------------------------------------------------------------------------- /Dino/Dino/DinoView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DinoView.swift 3 | // Dino 4 | // 5 | // Created by Yuhui Li on 2016-11-22. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import SpriteKit 11 | 12 | class DinoView: SKView { 13 | 14 | let dinoScene = DinoScene(size: CGSize(width: 1005, height: 30)) 15 | 16 | override func draw(_ dirtyRect: NSRect) { 17 | super.draw(dirtyRect) 18 | // Drawing code here. 19 | } 20 | 21 | func initScene() { 22 | self.presentScene(dinoScene) 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Dino/Dino/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | TouchBarDino 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2016 Yuhui Li. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /Dino/Dino/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Dino 4 | // 5 | // Created by Yuhui Li on 2016-11-21. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import SpriteKit 11 | 12 | struct Constants { 13 | static let touchBarWidth:CGFloat = 1005.0 14 | static let backgroundColor = NSColor(red: 247/255.0, green: 247/255.0, blue: 247/255.0, alpha: 1) 15 | } 16 | 17 | class ViewController: NSViewController { 18 | 19 | let dinoView: NSView = NSView() 20 | let dinoSKView = DinoView() 21 | let mainTapReceiverButton = NSButton(title: " ", target: self, action: #selector(tap)) 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | 26 | // Do any additional setup after loading the view. 27 | setupDinoView() 28 | setupMainTapReceiverButton() 29 | } 30 | 31 | func tap() { 32 | dinoSKView.dinoScene.jump() 33 | } 34 | 35 | func setupDinoView() { 36 | 37 | // Fix width 38 | dinoSKView.translatesAutoresizingMaskIntoConstraints = false 39 | let c1 = NSLayoutConstraint(item: dinoView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: Constants.touchBarWidth) 40 | // Constraints to sides 41 | let c2 = NSLayoutConstraint(item: dinoSKView, attribute: .leading, relatedBy: .equal, toItem: dinoView, attribute: .leading, multiplier: 1.0, constant: 0) 42 | let c3 = NSLayoutConstraint(item: dinoSKView, attribute: .trailing, relatedBy: .equal, toItem: dinoView, attribute: .trailing, multiplier: 1.0, constant: 0) 43 | let c4 = NSLayoutConstraint(item: dinoSKView, attribute: .top, relatedBy: .equal, toItem: dinoView, attribute: .top, multiplier: 1.0, constant: 0) 44 | let c5 = NSLayoutConstraint(item: dinoSKView, attribute: .bottom, relatedBy: .equal, toItem: dinoView, attribute: .bottom, multiplier: 1.0, constant: 0) 45 | 46 | dinoView.addConstraints([c1, c2, c3, c4, c5]) 47 | 48 | dinoView.wantsLayer = true 49 | dinoView.layer?.backgroundColor = Constants.backgroundColor.cgColor 50 | 51 | dinoSKView.initScene() 52 | 53 | dinoView.addSubview(dinoSKView) 54 | dinoView.addSubview(mainTapReceiverButton) 55 | } 56 | 57 | func setupDinoViewOnAppear() { 58 | 59 | if let touchBarView = dinoView.superview { 60 | 61 | // Constraints to sides 62 | let c1 = NSLayoutConstraint(item: dinoView, attribute: .leading, relatedBy: .equal, toItem: touchBarView, attribute: .leading, multiplier: 1.0, constant: 0) 63 | let c2 = NSLayoutConstraint(item: dinoView, attribute: .trailing, relatedBy: .equal, toItem: touchBarView, attribute: .trailing, multiplier: 1.0, constant: 0) 64 | let c3 = NSLayoutConstraint(item: dinoView, attribute: .top, relatedBy: .equal, toItem: touchBarView, attribute: .top, multiplier: 1.0, constant: 0) 65 | let c4 = NSLayoutConstraint(item: dinoView, attribute: .bottom, relatedBy: .equal, toItem: touchBarView, attribute: .bottom, multiplier: 1.0, constant: 0) 66 | 67 | touchBarView.addConstraints([c1, c2, c3, c4]) 68 | 69 | } else { 70 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: { 71 | self.setupDinoView() 72 | }) 73 | } 74 | } 75 | 76 | func setupMainTapReceiverButton() { 77 | mainTapReceiverButton.isTransparent = true 78 | mainTapReceiverButton.translatesAutoresizingMaskIntoConstraints = false 79 | 80 | // Constraints to sides 81 | let c1 = NSLayoutConstraint(item: mainTapReceiverButton, attribute: .leading, relatedBy: .equal, toItem: dinoView, attribute: .leading, multiplier: 1.0, constant: 0) 82 | let c2 = NSLayoutConstraint(item: mainTapReceiverButton, attribute: .trailing, relatedBy: .equal, toItem: dinoView, attribute: .trailing, multiplier: 1.0, constant: 0) 83 | let c3 = NSLayoutConstraint(item: mainTapReceiverButton, attribute: .top, relatedBy: .equal, toItem: dinoView, attribute: .top, multiplier: 1.0, constant: 0) 84 | let c4 = NSLayoutConstraint(item: mainTapReceiverButton, attribute: .bottom, relatedBy: .equal, toItem: dinoView, attribute: .bottom, multiplier: 1.0, constant: 0) 85 | 86 | dinoView.addConstraints([c1, c2, c3, c4]) 87 | } 88 | 89 | override var representedObject: Any? { 90 | didSet { 91 | // Update the view, if already loaded. 92 | } 93 | } 94 | 95 | } 96 | 97 | @available(OSX 10.12.2, *) 98 | extension ViewController: NSTouchBarDelegate { 99 | override func makeTouchBar() -> NSTouchBar? { 100 | let touchBar = NSTouchBar() 101 | touchBar.delegate = self 102 | touchBar.customizationIdentifier = .dinoBar 103 | touchBar.defaultItemIdentifiers = [.dinoItem] 104 | touchBar.customizationAllowedItemIdentifiers = [.dinoItem] 105 | return touchBar 106 | } 107 | 108 | func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItemIdentifier) -> NSTouchBarItem? { 109 | switch identifier { 110 | case NSTouchBarItemIdentifier.dinoItem: 111 | let customViewItem = NSCustomTouchBarItem(identifier: identifier) 112 | customViewItem.view = dinoView 113 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: { 114 | // Setup dinoView Constraints on TouchBar View Load 115 | self.setupDinoView() 116 | }) 117 | return customViewItem 118 | default: 119 | return nil 120 | } 121 | } 122 | } 123 | 124 | extension NSTouchBarCustomizationIdentifier { 125 | static let dinoBar = NSTouchBarCustomizationIdentifier("com.yuhuili.Dino.DinoBar") 126 | } 127 | 128 | extension NSTouchBarItemIdentifier { 129 | static let dinoItem = NSTouchBarItemIdentifier("com.yuhuili.Dino.DinoBar.main") 130 | } 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /Dino/Dino/WindowController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WindowController.swift 3 | // Dino 4 | // 5 | // Created by Yuhui Li on 2016-11-21. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class WindowController: NSWindowController { 12 | 13 | override func windowDidLoad() { 14 | super.windowDidLoad() 15 | 16 | // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. 17 | } 18 | 19 | @available(OSX 10.12.2, *) 20 | override func makeTouchBar() -> NSTouchBar? { 21 | guard let viewController = contentViewController as? ViewController else { 22 | return nil 23 | } 24 | return viewController.makeTouchBar() 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Dino/DinoTests/DinoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DinoTests.swift 3 | // DinoTests 4 | // 5 | // Created by Yuhui Li on 2016-11-21. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Dino 11 | 12 | class DinoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Dino/DinoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Dino/DinoUITests/DinoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DinoUITests.swift 3 | // DinoUITests 4 | // 5 | // Created by Yuhui Li on 2016-11-21. 6 | // Copyright © 2016 Yuhui Li. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DinoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Dino/DinoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /GitHub/play.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/GitHub/play.gif -------------------------------------------------------------------------------- /GitHub/poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/GitHub/poster.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Yuhui Li 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TouchBarDino 2 | Who hasn't played the dinosaur game in Chrome when the internet goes down? But how about with Touch Bar? 3 | 4 | 5 | 6 | TouchBarDino is a macOS app that simulates the dinosaur running game on the Touch Bar. It is written in Swift 3 and uses SpriteKit. 7 | 8 | ## How to play it 9 | * Have the latest MacBook Pro with Touch Bar? Download the compiled game [here](https://github.com/yuhuili/TouchBarDino/raw/master/Compiled/Dino%202016-11-22%2020-23-19/Dino.zip) 10 | * No? No worries, clone the repo and open it up in Xcode. Then go to Window->Show Touch Bar 11 | 12 | 13 | -------------------------------------------------------------------------------- /Resources/Dino2.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Dino2.psd -------------------------------------------------------------------------------- /Resources/Dino2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Dino2@2x.png -------------------------------------------------------------------------------- /Resources/DinoMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/DinoMask.png -------------------------------------------------------------------------------- /Resources/DinoMask.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/DinoMask.psd -------------------------------------------------------------------------------- /Resources/DinoSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/DinoSprite.png -------------------------------------------------------------------------------- /Resources/DinoSprite.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/DinoSprite.psd -------------------------------------------------------------------------------- /Resources/DinoSprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/DinoSprite@2x.png -------------------------------------------------------------------------------- /Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Icon.png -------------------------------------------------------------------------------- /Resources/Icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Icon.psd -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_128x128.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_16x16.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_256x256.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_32x32.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_512x512.png -------------------------------------------------------------------------------- /Resources/New icon.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/New icon.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /Resources/Obstacle.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Obstacle.psd -------------------------------------------------------------------------------- /Resources/Obstacle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuhuili/TouchBarDino/7d51ef34040bb633b45751b3bf3c5c61968aa9c0/Resources/Obstacle@2x.png --------------------------------------------------------------------------------