refactor project structure; add code for drawing buildings
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
@ -7,47 +7,49 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
F3D3F3982216EBEC00628D44 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F3972216EBEC00628D44 /* AppDelegate.swift */; };
|
||||
F3D3F39A2216EBEC00628D44 /* GameScene.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3992216EBEC00628D44 /* GameScene.sks */; };
|
||||
F3D3F39E2216EBEC00628D44 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F39D2216EBEC00628D44 /* GameScene.swift */; };
|
||||
F3D3F3A02216EBEC00628D44 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F39F2216EBEC00628D44 /* GameViewController.swift */; };
|
||||
F3D3F3A32216EBEC00628D44 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3A12216EBEC00628D44 /* Main.storyboard */; };
|
||||
F3D3F3A52216EBED00628D44 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3A42216EBED00628D44 /* Assets.xcassets */; };
|
||||
F3D3F3A82216EBED00628D44 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3A62216EBED00628D44 /* LaunchScreen.storyboard */; };
|
||||
F3D3F3BB2216EE5100628D44 /* player2Throw.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B02216EE5100628D44 /* player2Throw.png */; };
|
||||
F3D3F3BC2216EE5100628D44 /* hitBuilding.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B12216EE5100628D44 /* hitBuilding.sks */; };
|
||||
F3D3F3BD2216EE5100628D44 /* spark.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B22216EE5100628D44 /* spark.png */; };
|
||||
F3D3F3BE2216EE5100628D44 /* player@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B32216EE5100628D44 /* player@2x.png */; };
|
||||
F3D3F3BF2216EE5100628D44 /* player1Throw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B42216EE5100628D44 /* player1Throw@2x.png */; };
|
||||
F3D3F3C02216EE5100628D44 /* banana@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B52216EE5100628D44 /* banana@2x.png */; };
|
||||
F3D3F3C12216EE5100628D44 /* player1Throw.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B62216EE5100628D44 /* player1Throw.png */; };
|
||||
F3D3F3C22216EE5100628D44 /* hitPlayer.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B72216EE5100628D44 /* hitPlayer.sks */; };
|
||||
F3D3F3C32216EE5100628D44 /* banana.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B82216EE5100628D44 /* banana.png */; };
|
||||
F3D3F3C42216EE5100628D44 /* player.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3B92216EE5100628D44 /* player.png */; };
|
||||
F3D3F3C52216EE5100628D44 /* player2Throw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3BA2216EE5100628D44 /* player2Throw@2x.png */; };
|
||||
F3D3F3D72216F51E00628D44 /* BuildingNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F3CB2216F51E00628D44 /* BuildingNode.swift */; };
|
||||
F3D3F3D92216F51E00628D44 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3CF2216F51E00628D44 /* LaunchScreen.storyboard */; };
|
||||
F3D3F3DA2216F51E00628D44 /* GameScene.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3D02216F51E00628D44 /* GameScene.sks */; };
|
||||
F3D3F3DC2216F51E00628D44 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F3D32216F51E00628D44 /* AppDelegate.swift */; };
|
||||
F3D3F3ED2216F52F00628D44 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E02216F52F00628D44 /* Assets.xcassets */; };
|
||||
F3D3F3EE2216F52F00628D44 /* player2Throw.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E22216F52F00628D44 /* player2Throw.png */; };
|
||||
F3D3F3EF2216F52F00628D44 /* hitBuilding.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E32216F52F00628D44 /* hitBuilding.sks */; };
|
||||
F3D3F3F02216F52F00628D44 /* spark.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E42216F52F00628D44 /* spark.png */; };
|
||||
F3D3F3F12216F52F00628D44 /* player@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E52216F52F00628D44 /* player@2x.png */; };
|
||||
F3D3F3F22216F52F00628D44 /* player1Throw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E62216F52F00628D44 /* player1Throw@2x.png */; };
|
||||
F3D3F3F32216F52F00628D44 /* banana@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E72216F52F00628D44 /* banana@2x.png */; };
|
||||
F3D3F3F42216F52F00628D44 /* player1Throw.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E82216F52F00628D44 /* player1Throw.png */; };
|
||||
F3D3F3F52216F52F00628D44 /* hitPlayer.sks in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3E92216F52F00628D44 /* hitPlayer.sks */; };
|
||||
F3D3F3F62216F52F00628D44 /* banana.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3EA2216F52F00628D44 /* banana.png */; };
|
||||
F3D3F3F72216F52F00628D44 /* player.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3EB2216F52F00628D44 /* player.png */; };
|
||||
F3D3F3F82216F52F00628D44 /* player2Throw@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3EC2216F52F00628D44 /* player2Throw@2x.png */; };
|
||||
F3D3F3FD2216F62800628D44 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F3FA2216F62800628D44 /* GameViewController.swift */; };
|
||||
F3D3F3FE2216F62800628D44 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F3D3F3FB2216F62800628D44 /* Main.storyboard */; };
|
||||
F3D3F3FF2216F62800628D44 /* GameScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3D3F3FC2216F62800628D44 /* GameScene.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
F3D3F3942216EBEC00628D44 /* Gorillas Remake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Gorillas Remake.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F3D3F3972216EBEC00628D44 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
F3D3F3992216EBEC00628D44 /* GameScene.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = GameScene.sks; sourceTree = "<group>"; };
|
||||
F3D3F39D2216EBEC00628D44 /* GameScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; };
|
||||
F3D3F39F2216EBEC00628D44 /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = "<group>"; };
|
||||
F3D3F3A22216EBEC00628D44 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
F3D3F3A42216EBED00628D44 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
F3D3F3A72216EBED00628D44 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
F3D3F3A92216EBED00628D44 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
F3D3F3B02216EE5100628D44 /* player2Throw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player2Throw.png; sourceTree = "<group>"; };
|
||||
F3D3F3B12216EE5100628D44 /* hitBuilding.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = hitBuilding.sks; sourceTree = "<group>"; };
|
||||
F3D3F3B22216EE5100628D44 /* spark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spark.png; sourceTree = "<group>"; };
|
||||
F3D3F3B32216EE5100628D44 /* player@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3B42216EE5100628D44 /* player1Throw@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player1Throw@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3B52216EE5100628D44 /* banana@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "banana@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3B62216EE5100628D44 /* player1Throw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player1Throw.png; sourceTree = "<group>"; };
|
||||
F3D3F3B72216EE5100628D44 /* hitPlayer.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = hitPlayer.sks; sourceTree = "<group>"; };
|
||||
F3D3F3B82216EE5100628D44 /* banana.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = banana.png; sourceTree = "<group>"; };
|
||||
F3D3F3B92216EE5100628D44 /* player.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player.png; sourceTree = "<group>"; };
|
||||
F3D3F3BA2216EE5100628D44 /* player2Throw@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player2Throw@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3CB2216F51E00628D44 /* BuildingNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuildingNode.swift; sourceTree = "<group>"; };
|
||||
F3D3F3CF2216F51E00628D44 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
F3D3F3D02216F51E00628D44 /* GameScene.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = GameScene.sks; sourceTree = "<group>"; };
|
||||
F3D3F3D12216F51E00628D44 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
F3D3F3D32216F51E00628D44 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
F3D3F3E02216F52F00628D44 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
F3D3F3E22216F52F00628D44 /* player2Throw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player2Throw.png; sourceTree = "<group>"; };
|
||||
F3D3F3E32216F52F00628D44 /* hitBuilding.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = hitBuilding.sks; sourceTree = "<group>"; };
|
||||
F3D3F3E42216F52F00628D44 /* spark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spark.png; sourceTree = "<group>"; };
|
||||
F3D3F3E52216F52F00628D44 /* player@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3E62216F52F00628D44 /* player1Throw@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player1Throw@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3E72216F52F00628D44 /* banana@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "banana@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3E82216F52F00628D44 /* player1Throw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player1Throw.png; sourceTree = "<group>"; };
|
||||
F3D3F3E92216F52F00628D44 /* hitPlayer.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = hitPlayer.sks; sourceTree = "<group>"; };
|
||||
F3D3F3EA2216F52F00628D44 /* banana.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = banana.png; sourceTree = "<group>"; };
|
||||
F3D3F3EB2216F52F00628D44 /* player.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = player.png; sourceTree = "<group>"; };
|
||||
F3D3F3EC2216F52F00628D44 /* player2Throw@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "player2Throw@2x.png"; sourceTree = "<group>"; };
|
||||
F3D3F3FA2216F62800628D44 /* GameViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = "<group>"; };
|
||||
F3D3F3FB2216F62800628D44 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
|
||||
F3D3F3FC2216F62800628D44 /* GameScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameScene.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -64,7 +66,8 @@
|
|||
F3D3F38B2216EBEC00628D44 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3962216EBEC00628D44 /* Gorillas Remake */,
|
||||
F3D3F3DF2216F52F00628D44 /* Assets */,
|
||||
F3D3F3C92216F51E00628D44 /* Sources */,
|
||||
F3D3F3952216EBEC00628D44 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
|
@ -77,40 +80,88 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3962216EBEC00628D44 /* Gorillas Remake */ = {
|
||||
F3D3F3C92216F51E00628D44 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3972216EBEC00628D44 /* AppDelegate.swift */,
|
||||
F3D3F3992216EBEC00628D44 /* GameScene.sks */,
|
||||
F3D3F39D2216EBEC00628D44 /* GameScene.swift */,
|
||||
F3D3F39F2216EBEC00628D44 /* GameViewController.swift */,
|
||||
F3D3F3A12216EBEC00628D44 /* Main.storyboard */,
|
||||
F3D3F3A42216EBED00628D44 /* Assets.xcassets */,
|
||||
F3D3F3A62216EBED00628D44 /* LaunchScreen.storyboard */,
|
||||
F3D3F3A92216EBED00628D44 /* Info.plist */,
|
||||
F3D3F3AF2216EE5100628D44 /* Content */,
|
||||
F3D3F3CA2216F51E00628D44 /* Models */,
|
||||
F3D3F3CE2216F51E00628D44 /* Supporting Files */,
|
||||
F3D3F3D22216F51E00628D44 /* App Start */,
|
||||
F3D3F3D42216F51E00628D44 /* Controllers */,
|
||||
);
|
||||
path = "Gorillas Remake";
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3AF2216EE5100628D44 /* Content */ = {
|
||||
F3D3F3CA2216F51E00628D44 /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3B02216EE5100628D44 /* player2Throw.png */,
|
||||
F3D3F3B12216EE5100628D44 /* hitBuilding.sks */,
|
||||
F3D3F3B22216EE5100628D44 /* spark.png */,
|
||||
F3D3F3B32216EE5100628D44 /* player@2x.png */,
|
||||
F3D3F3B42216EE5100628D44 /* player1Throw@2x.png */,
|
||||
F3D3F3B52216EE5100628D44 /* banana@2x.png */,
|
||||
F3D3F3B62216EE5100628D44 /* player1Throw.png */,
|
||||
F3D3F3B72216EE5100628D44 /* hitPlayer.sks */,
|
||||
F3D3F3B82216EE5100628D44 /* banana.png */,
|
||||
F3D3F3B92216EE5100628D44 /* player.png */,
|
||||
F3D3F3BA2216EE5100628D44 /* player2Throw@2x.png */,
|
||||
F3D3F3CB2216F51E00628D44 /* BuildingNode.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3CE2216F51E00628D44 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3CF2216F51E00628D44 /* LaunchScreen.storyboard */,
|
||||
F3D3F3D02216F51E00628D44 /* GameScene.sks */,
|
||||
F3D3F3D12216F51E00628D44 /* Info.plist */,
|
||||
);
|
||||
path = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3D22216F51E00628D44 /* App Start */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3D32216F51E00628D44 /* AppDelegate.swift */,
|
||||
);
|
||||
path = "App Start";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3D42216F51E00628D44 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3F92216F62800628D44 /* Main */,
|
||||
);
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3DF2216F52F00628D44 /* Assets */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3E02216F52F00628D44 /* Assets.xcassets */,
|
||||
F3D3F3E12216F52F00628D44 /* Content */,
|
||||
);
|
||||
path = Assets;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3E12216F52F00628D44 /* Content */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3E22216F52F00628D44 /* player2Throw.png */,
|
||||
F3D3F3E32216F52F00628D44 /* hitBuilding.sks */,
|
||||
F3D3F3E42216F52F00628D44 /* spark.png */,
|
||||
F3D3F3E52216F52F00628D44 /* player@2x.png */,
|
||||
F3D3F3E62216F52F00628D44 /* player1Throw@2x.png */,
|
||||
F3D3F3E72216F52F00628D44 /* banana@2x.png */,
|
||||
F3D3F3E82216F52F00628D44 /* player1Throw.png */,
|
||||
F3D3F3E92216F52F00628D44 /* hitPlayer.sks */,
|
||||
F3D3F3EA2216F52F00628D44 /* banana.png */,
|
||||
F3D3F3EB2216F52F00628D44 /* player.png */,
|
||||
F3D3F3EC2216F52F00628D44 /* player2Throw@2x.png */,
|
||||
);
|
||||
path = Content;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3F92216F62800628D44 /* Main */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F3D3F3FA2216F62800628D44 /* GameViewController.swift */,
|
||||
F3D3F3FB2216F62800628D44 /* Main.storyboard */,
|
||||
F3D3F3FC2216F62800628D44 /* GameScene.swift */,
|
||||
);
|
||||
path = Main;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -169,21 +220,21 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3D3F3C42216EE5100628D44 /* player.png in Resources */,
|
||||
F3D3F3C52216EE5100628D44 /* player2Throw@2x.png in Resources */,
|
||||
F3D3F3A32216EBEC00628D44 /* Main.storyboard in Resources */,
|
||||
F3D3F39A2216EBEC00628D44 /* GameScene.sks in Resources */,
|
||||
F3D3F3C22216EE5100628D44 /* hitPlayer.sks in Resources */,
|
||||
F3D3F3A52216EBED00628D44 /* Assets.xcassets in Resources */,
|
||||
F3D3F3BD2216EE5100628D44 /* spark.png in Resources */,
|
||||
F3D3F3BB2216EE5100628D44 /* player2Throw.png in Resources */,
|
||||
F3D3F3C32216EE5100628D44 /* banana.png in Resources */,
|
||||
F3D3F3C12216EE5100628D44 /* player1Throw.png in Resources */,
|
||||
F3D3F3A82216EBED00628D44 /* LaunchScreen.storyboard in Resources */,
|
||||
F3D3F3BC2216EE5100628D44 /* hitBuilding.sks in Resources */,
|
||||
F3D3F3C02216EE5100628D44 /* banana@2x.png in Resources */,
|
||||
F3D3F3BF2216EE5100628D44 /* player1Throw@2x.png in Resources */,
|
||||
F3D3F3BE2216EE5100628D44 /* player@2x.png in Resources */,
|
||||
F3D3F3EE2216F52F00628D44 /* player2Throw.png in Resources */,
|
||||
F3D3F3F52216F52F00628D44 /* hitPlayer.sks in Resources */,
|
||||
F3D3F3F82216F52F00628D44 /* player2Throw@2x.png in Resources */,
|
||||
F3D3F3F62216F52F00628D44 /* banana.png in Resources */,
|
||||
F3D3F3EF2216F52F00628D44 /* hitBuilding.sks in Resources */,
|
||||
F3D3F3DA2216F51E00628D44 /* GameScene.sks in Resources */,
|
||||
F3D3F3FE2216F62800628D44 /* Main.storyboard in Resources */,
|
||||
F3D3F3F02216F52F00628D44 /* spark.png in Resources */,
|
||||
F3D3F3D92216F51E00628D44 /* LaunchScreen.storyboard in Resources */,
|
||||
F3D3F3F12216F52F00628D44 /* player@2x.png in Resources */,
|
||||
F3D3F3F22216F52F00628D44 /* player1Throw@2x.png in Resources */,
|
||||
F3D3F3F72216F52F00628D44 /* player.png in Resources */,
|
||||
F3D3F3F42216F52F00628D44 /* player1Throw.png in Resources */,
|
||||
F3D3F3F32216F52F00628D44 /* banana@2x.png in Resources */,
|
||||
F3D3F3ED2216F52F00628D44 /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -194,33 +245,15 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F3D3F39E2216EBEC00628D44 /* GameScene.swift in Sources */,
|
||||
F3D3F3A02216EBEC00628D44 /* GameViewController.swift in Sources */,
|
||||
F3D3F3982216EBEC00628D44 /* AppDelegate.swift in Sources */,
|
||||
F3D3F3DC2216F51E00628D44 /* AppDelegate.swift in Sources */,
|
||||
F3D3F3FD2216F62800628D44 /* GameViewController.swift in Sources */,
|
||||
F3D3F3FF2216F62800628D44 /* GameScene.swift in Sources */,
|
||||
F3D3F3D72216F51E00628D44 /* BuildingNode.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
F3D3F3A12216EBEC00628D44 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
F3D3F3A22216EBEC00628D44 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F3D3F3A62216EBED00628D44 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
F3D3F3A72216EBED00628D44 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
F3D3F3AA2216EBED00628D44 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
|
@ -344,7 +377,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = QRXXH2RKAG;
|
||||
INFOPLIST_FILE = "Gorillas Remake/Info.plist";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
@ -362,7 +395,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = QRXXH2RKAG;
|
||||
INFOPLIST_FILE = "Gorillas Remake/Info.plist";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/Sources/Supporting Files/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
|
|
@ -12,6 +12,19 @@ import GameplayKit
|
|||
let sceneWidth = 1024.0
|
||||
let sceneHeight = 768.0
|
||||
|
||||
enum CollisionBitMasks: UInt32 {
|
||||
case banana = 1
|
||||
case building = 2
|
||||
case player = 4
|
||||
}
|
||||
|
||||
enum NodeNames: String {
|
||||
case banana
|
||||
case building
|
||||
case player
|
||||
}
|
||||
|
||||
|
||||
class GameScene: SKScene {
|
||||
lazy var sceneCenter = CGPoint(x: sceneWidth / 2.0, y: sceneHeight / 2.0)
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
//
|
||||
// BuildingNode.swift
|
||||
// Gorillas Remake
|
||||
//
|
||||
// Created by Brian Sipple on 2/15/19.
|
||||
// Copyright © 2019 Brian Sipple. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SpriteKit
|
||||
|
||||
let windowRowSpacing = 40
|
||||
|
||||
let buildingColorChoices = [
|
||||
UIColor(hue: 0.502, saturation: 0.98, brightness: 0.67, alpha: 1),
|
||||
UIColor(hue: 0.999, saturation: 0.99, brightness: 0.67, alpha: 1),
|
||||
UIColor(hue: 0, saturation: 0, brightness: 0.67, alpha: 1),
|
||||
]
|
||||
|
||||
let litWindowColor = UIColor(hue: 0.190, saturation: 0.67, brightness: 0.99, alpha: 1)
|
||||
let darkWindowColor = UIColor(hue: 0, saturation: 0, brightness: 0.34, alpha: 1)
|
||||
|
||||
class BuildingNode: SKSpriteNode {
|
||||
lazy var renderer = UIGraphicsImageRenderer(size: size)
|
||||
|
||||
var currentImage: UIImage! {
|
||||
didSet {
|
||||
texture = SKTexture(image: currentImage)
|
||||
}
|
||||
}
|
||||
|
||||
func setup() {
|
||||
name = NodeNames.building.rawValue
|
||||
currentImage = draw(size: size)
|
||||
|
||||
configurePhysics()
|
||||
}
|
||||
|
||||
func draw(size: CGSize) -> UIImage {
|
||||
return renderer.image(actions: { (context: UIGraphicsImageRendererContext) in
|
||||
let cgContext = context.cgContext
|
||||
let buildingFrame = CGRect(x: 0, y: 0, width: size.width, height: size.height)
|
||||
let buildingColor = buildingColorChoices.randomElement()!
|
||||
|
||||
cgContext.setFillColor(buildingColor.cgColor)
|
||||
cgContext.addRect(buildingFrame)
|
||||
cgContext.drawPath(using: .fill)
|
||||
|
||||
for windowRow in stride(from: 10, to: Int(size.height - 10), by: windowRowSpacing) {
|
||||
for column in stride(from: 10, to: Int(size.width - 10), by: windowRowSpacing) {
|
||||
let windowColor = Bool.random() ? litWindowColor : darkWindowColor
|
||||
|
||||
cgContext.setFillColor(windowColor.cgColor)
|
||||
cgContext.fill(CGRect(x: column, y: windowRow, width: 15, height: 20))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
func configurePhysics() {
|
||||
physicsBody = SKPhysicsBody(texture: texture!, size: size)
|
||||
physicsBody?.isDynamic = false
|
||||
physicsBody?.categoryBitMask = CollisionBitMasks.building.rawValue
|
||||
physicsBody?.contactTestBitMask = CollisionBitMasks.banana.rawValue
|
||||
}
|
||||
}
|
|
@ -24,6 +24,8 @@
|
|||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
@ -37,8 +39,6 @@
|
|||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
|
@ -45,7 +45,7 @@
|
|||
| 26 | 🎮<br>[Marble Maze](/26-marble-maze) | categoryBitMask, collisionBitMask, contactTestBitMask, CMMotionManager, startAccelerometerUpdates, reading accelerometer data, compiler directives | ✅ |
|
||||
| 27 | 🛠<br>[Core Graphics](/27-core-graphics) | Core 👏 Graphics 👏, UIGraphicsImageRenderer, exporting images with UIGraphicsImageRenderer.image(), UIGraphicsImageRendererContext, CGContext, CGContext.addRect(), CGContext.addEllipse(), NSString.draw(with:), UIFont, NSMutableParagraphStyle(), drawing UIImages straight into a rendering context | ✅ |
|
||||
| 28 | 📱<br>[Secret Swift](/28-secret-text-editor) | Using the KeychainAccess library, resignFirstResponder(), NotificationCenter, UIApplication.willResignActiveNotification, LocalAuthentication, LAContext, canEvaluatePolicy(), .deviceOwnerAuthenticationWithBiometrics, evaluatePolicy(), privacy for Touch ID & Face ID, simulating Face ID with the Simulator | ✅ |
|
||||
| 29 | 🎮<br>[Exploding Monkeys](/29-exploding-monkeys) | UIKit + SpriteKit, Texture Atlases, Scene Transitions, Destructable Terrain | 🔴 |
|
||||
| 29 | 🎮<br>[Exploding Monkeys](/29-exploding-monkeys) | UIKit + SpriteKit, texture atlases, scene transitions, destructable terrain, using `stride` to create a sequence of evenly-spaced numbers 💥 | 🚧 |
|
||||
| 30 | 🛠<br>[Instruments](/30-instruments) | TimeProfiler, Color Blended Layers, Color Offscreen-Rendered Yellow, Color Hits Green and Misses Red | 🔴 |
|
||||
|
||||
## Advanced 📘
|
||||
|
|