├── bubble ├── Resource │ ├── BombSound.mp3 │ ├── PopSound.mp3 │ └── BubbleSound.mp3 ├── WXApi │ ├── libWeChatSDK.a │ ├── WXApi.h │ └── WXApiObject.h ├── Images.xcassets │ ├── Game │ │ ├── Background.imageset │ │ │ ├── 2x.png │ │ │ ├── Background.png │ │ │ └── Contents.json │ │ ├── BubbleFlat.imageset │ │ │ ├── BubbleFlat-1.png │ │ │ ├── BubbleFlat.png │ │ │ └── Contents.json │ │ ├── BubbleBombFlat.imageset │ │ │ ├── BubbleBomb.png │ │ │ ├── BubbleBomb-1.png │ │ │ └── Contents.json │ │ ├── BubbleNormal.imageset │ │ │ ├── BubbleNormal.png │ │ │ ├── BubbleNormal-1.png │ │ │ └── Contents.json │ │ └── BubbleBombNormal.imageset │ │ │ ├── BubbleBomb.png │ │ │ ├── BubbleBomb-1.png │ │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── bubble120.png │ │ ├── bubble180.png │ │ └── Contents.json │ ├── Icon │ │ ├── TitleLogo.imageset │ │ │ ├── IconLogo.png │ │ │ ├── IconLogo2.png │ │ │ └── Contents.json │ │ ├── ShareIcon.imageset │ │ │ ├── bubble120.png │ │ │ ├── bubble180.png │ │ │ └── Contents.json │ │ └── TitleGameOver.imageset │ │ │ ├── OverTitle.png │ │ │ ├── OverTitle-1.png │ │ │ └── Contents.json │ ├── Button │ │ ├── ButtonHome.imageset │ │ │ ├── HomeButton.png │ │ │ └── Contents.json │ │ ├── ButtonStar.imageset │ │ │ ├── ButtonStar.png │ │ │ └── Contents.json │ │ ├── ButtonShare.imageset │ │ │ ├── ButtonShare.png │ │ │ └── Contents.json │ │ ├── ButtonStart.imageset │ │ │ ├── ButtonStart.png │ │ │ ├── ButtonStart-1.png │ │ │ └── Contents.json │ │ ├── ButtonRestart.imageset │ │ │ ├── RestartButton.png │ │ │ └── Contents.json │ │ └── ButtonLeaderboard.imageset │ │ │ ├── ButtonLeaderboard.png │ │ │ └── Contents.json │ ├── LaunchImage.launchimage │ │ ├── LaunchImageR4.png │ │ └── Contents.json │ └── Background │ │ └── MenuBackground.imageset │ │ ├── MenuBackground.png │ │ ├── MenuBackground-1.png │ │ └── Contents.json ├── GameScene.h ├── MenuScene.h ├── GameViewController.h ├── ResultScene.h ├── AppDelegate.h ├── main.m ├── GlobalHolder.h ├── BombBubbleNode.h ├── NormalBubbleNode.h ├── BubblePoolService.h ├── GameCenterService.h ├── BombBubbleNode.m ├── NormalBubbleNode.m ├── BubbleNode.h ├── GlobalHolder.m ├── Info.plist ├── GameViewController.m ├── AppDelegate.m ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.xib ├── BubbleNode.m ├── GameCenterService.m ├── BubblePoolService.m ├── MenuScene.m ├── ResultScene.m └── GameScene.m ├── bubble.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── .gitignore ├── bubbleTests ├── Info.plist └── bubbleTests.m ├── LICENSE └── README.md /bubble/Resource/BombSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Resource/BombSound.mp3 -------------------------------------------------------------------------------- /bubble/Resource/PopSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Resource/PopSound.mp3 -------------------------------------------------------------------------------- /bubble/WXApi/libWeChatSDK.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/WXApi/libWeChatSDK.a -------------------------------------------------------------------------------- /bubble/Resource/BubbleSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Resource/BubbleSound.mp3 -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/Background.imageset/2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/Background.imageset/2x.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/AppIcon.appiconset/bubble120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/AppIcon.appiconset/bubble120.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/AppIcon.appiconset/bubble180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/AppIcon.appiconset/bubble180.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleLogo.imageset/IconLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/TitleLogo.imageset/IconLogo.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/ShareIcon.imageset/bubble120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/ShareIcon.imageset/bubble120.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/ShareIcon.imageset/bubble180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/ShareIcon.imageset/bubble180.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleLogo.imageset/IconLogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/TitleLogo.imageset/IconLogo2.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonHome.imageset/HomeButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonHome.imageset/HomeButton.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonStar.imageset/ButtonStar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonStar.imageset/ButtonStar.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/Background.imageset/Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/Background.imageset/Background.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleFlat.imageset/BubbleFlat-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleFlat.imageset/BubbleFlat-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleFlat.imageset/BubbleFlat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleFlat.imageset/BubbleFlat.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleGameOver.imageset/OverTitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/TitleGameOver.imageset/OverTitle.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/LaunchImage.launchimage/LaunchImageR4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/LaunchImage.launchimage/LaunchImageR4.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonShare.imageset/ButtonShare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonShare.imageset/ButtonShare.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonStart.imageset/ButtonStart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonStart.imageset/ButtonStart.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombFlat.imageset/BubbleBomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleBombFlat.imageset/BubbleBomb.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleNormal.imageset/BubbleNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleNormal.imageset/BubbleNormal.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleGameOver.imageset/OverTitle-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Icon/TitleGameOver.imageset/OverTitle-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonStart.imageset/ButtonStart-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonStart.imageset/ButtonStart-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombFlat.imageset/BubbleBomb-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleBombFlat.imageset/BubbleBomb-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombNormal.imageset/BubbleBomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleBombNormal.imageset/BubbleBomb.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleNormal.imageset/BubbleNormal-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleNormal.imageset/BubbleNormal-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonRestart.imageset/RestartButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonRestart.imageset/RestartButton.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombNormal.imageset/BubbleBomb-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Game/BubbleBombNormal.imageset/BubbleBomb-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Background/MenuBackground.imageset/MenuBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Background/MenuBackground.imageset/MenuBackground.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Background/MenuBackground.imageset/MenuBackground-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Background/MenuBackground.imageset/MenuBackground-1.png -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonLeaderboard.imageset/ButtonLeaderboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/simpleapples/bubble/HEAD/bubble/Images.xcassets/Button/ButtonLeaderboard.imageset/ButtonLeaderboard.png -------------------------------------------------------------------------------- /bubble.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bubble/GameScene.h: -------------------------------------------------------------------------------- 1 | // 2 | // GameScene.h 3 | // bubble 4 | // 5 | 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GameScene : SKScene 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /bubble/MenuScene.h: -------------------------------------------------------------------------------- 1 | // 2 | // MenuScene.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MenuScene : SKScene 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /bubble/GameViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GameViewController.h 3 | // bubble 4 | // 5 | 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GameViewController : UIViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /bubble/ResultScene.h: -------------------------------------------------------------------------------- 1 | // 2 | // ResultScene.h 3 | // bubble 4 | // 5 | // Created by Zzy on 12/4/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ResultScene : SKScene 12 | 13 | @property (nonatomic) NSInteger score; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /bubble/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /bubble/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /bubble/GlobalHolder.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalHolder.h 3 | // bubble 4 | // 5 | // Created by Zzy on 12/3/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GlobalHolder : NSObject 12 | 13 | @property (nonatomic) NSInteger bestScore; 14 | 15 | + (GlobalHolder *)sharedSingleton; 16 | 17 | - (void)recoverFromLocal; 18 | - (void)backupToLocal; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonHome.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x", 14 | "filename" : "HomeButton.png" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonShare.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x", 14 | "filename" : "ButtonShare.png" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonStar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x", 14 | "filename" : "ButtonStar.png" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonRestart.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x", 14 | "filename" : "RestartButton.png" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonLeaderboard.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x", 14 | "filename" : "ButtonLeaderboard.png" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/Background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "Background.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/ShareIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "bubble120.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "bubble180.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleLogo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "IconLogo2.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "IconLogo.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleFlat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "BubbleFlat-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "BubbleFlat.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Button/ButtonStart.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "ButtonStart-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "ButtonStart.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombFlat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "BubbleBomb-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "BubbleBomb.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Icon/TitleGameOver.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "OverTitle-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "OverTitle.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleBombNormal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "BubbleBomb-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "BubbleBomb.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Game/BubbleNormal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "BubbleNormal-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "BubbleNormal.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/Images.xcassets/Background/MenuBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "MenuBackground-1.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x", 15 | "filename" : "MenuBackground.png" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /bubble/BombBubbleNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // BombBubbleNode.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/27/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "BubbleNode.h" 10 | 11 | @class BombBubbleNode; 12 | 13 | @protocol BombBubbleNodeDelegate 14 | 15 | - (void)bombBubbleNodeClick:(BombBubbleNode *)bombBubbleNode; 16 | 17 | @end 18 | 19 | @interface BombBubbleNode : BubbleNode 20 | 21 | @property (nonatomic, assign) id delegate; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /bubble/NormalBubbleNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // NormalBubbleNode.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/27/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "BubbleNode.h" 10 | 11 | @class NormalBubbleNode; 12 | 13 | @protocol NormalBubbleNodeDelegate 14 | 15 | - (void)normalBubbleNodeClick:(NormalBubbleNode *)normalBubbleNode; 16 | 17 | @end 18 | 19 | @interface NormalBubbleNode : BubbleNode 20 | 21 | @property (nonatomic, assign) id delegate; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /bubble/BubblePoolService.h: -------------------------------------------------------------------------------- 1 | // 2 | // BubblePoolService.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/28/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NormalBubbleNode; 12 | @class BombBubbleNode; 13 | 14 | @interface BubblePoolService : NSObject 15 | 16 | + (BubblePoolService *)sharedSingleton; 17 | - (NormalBubbleNode *)normalBubble; 18 | - (BombBubbleNode *)bombBubble; 19 | - (void)releaseBubbleWithIndex:(NSInteger)index; 20 | - (void)resetPool; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | -------------------------------------------------------------------------------- /bubble/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "LaunchImage2x.png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "LaunchImageR4.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /bubble/GameCenterService.h: -------------------------------------------------------------------------------- 1 | // 2 | // GameCenterService.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/28/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef void (^AuthUserBlock)(BOOL success, UIViewController *authViewController); 13 | typedef void (^ReportScoreBlock)(BOOL success); 14 | 15 | @interface GameCenterService : NSObject 16 | 17 | + (GameCenterService *)sharedSingleton; 18 | 19 | - (void)authUserWithBlock:(AuthUserBlock)block; 20 | - (void)reportBestScore:(NSInteger)score block:(ReportScoreBlock)block; 21 | - (void)showLeaderboardWithTarget:(UIViewController *)target; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /bubble/BombBubbleNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // BombBubbleNode.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/27/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "BombBubbleNode.h" 10 | 11 | @interface BombBubbleNode () 12 | 13 | @property (strong, nonatomic) SKAction *sequenceAction; 14 | 15 | @end 16 | 17 | @implementation BombBubbleNode 18 | 19 | - (instancetype)init 20 | { 21 | self = [super initWithNormalFile:@"BubbleBombNormal" flatFile:@"BubbleBombFlat"]; 22 | if (self) { 23 | self.type = BUBBLE_TYPE_BOMB; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)onBubbleClick 29 | { 30 | if ([self.delegate respondsToSelector:@selector(bombBubbleNodeClick:)]) { 31 | [self.delegate bombBubbleNodeClick:self]; 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /bubbleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.zangzhiya.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /bubble/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "size" : "60x60", 25 | "idiom" : "iphone", 26 | "filename" : "bubble120.png", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "size" : "60x60", 31 | "idiom" : "iphone", 32 | "filename" : "bubble180.png", 33 | "scale" : "3x" 34 | } 35 | ], 36 | "info" : { 37 | "version" : 1, 38 | "author" : "xcode" 39 | } 40 | } -------------------------------------------------------------------------------- /bubble/NormalBubbleNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // NormalBubbleNode.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/27/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "NormalBubbleNode.h" 10 | 11 | @interface NormalBubbleNode () 12 | 13 | @property (strong, nonatomic) SKAction *playSoundAction; 14 | 15 | @end 16 | 17 | @implementation NormalBubbleNode 18 | 19 | - (instancetype)init 20 | { 21 | self = [super initWithNormalFile:@"BubbleNormal" flatFile:@"BubbleFlat"]; 22 | if (self) { 23 | self.type = BUBBLE_TYPE_NORMAL; 24 | self.playSoundAction = [SKAction playSoundFileNamed:@"BubbleSound.mp3" waitForCompletion:NO]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)onBubbleClick 30 | { 31 | [self runAction:self.playSoundAction]; 32 | if ([self.delegate respondsToSelector:@selector(normalBubbleNodeClick:)]) { 33 | [self.delegate normalBubbleNodeClick:self]; 34 | } 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /bubbleTests/bubbleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // bubbleTests.m 3 | // bubbleTests 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface bubbleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation bubbleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /bubble/BubbleNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // BubbleNode.h 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, BUBBLE_TYPE) { 12 | BUBBLE_TYPE_NORMAL = 0, 13 | BUBBLE_TYPE_BOMB, 14 | }; 15 | 16 | typedef NS_ENUM(NSInteger, BUBBLE_STATUS) { 17 | BUBBLE_STATUS_NORMAL = 0, 18 | BUBBLE_STATUS_FlAT, 19 | }; 20 | 21 | typedef NS_ENUM(NSInteger, BUBBLE_POOL_STATUS) { 22 | BUBBLE_POOL_STATUS_AVAILABLE = 0, 23 | BUBBLE_POOL_STATUS_UNAVAILABLE, 24 | }; 25 | 26 | @interface BubbleNode : SKSpriteNode 27 | 28 | @property (nonatomic) BUBBLE_TYPE type; 29 | @property (nonatomic) BUBBLE_STATUS status; 30 | @property (nonatomic) BUBBLE_POOL_STATUS poolStatus; 31 | @property (nonatomic) NSInteger poolIndex; 32 | 33 | - (instancetype)initWithNormalFile:(NSString *)normarlFile flatFile:(NSString *)flatFile; 34 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 35 | - (void)setSize:(CGSize)size; 36 | - (void)setStatus:(BUBBLE_STATUS)status; 37 | 38 | @end -------------------------------------------------------------------------------- /bubble/GlobalHolder.m: -------------------------------------------------------------------------------- 1 | // 2 | // GlobalHolder.m 3 | // bubble 4 | // 5 | // Created by Zzy on 12/3/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "GlobalHolder.h" 10 | 11 | @implementation GlobalHolder 12 | 13 | + (GlobalHolder *)sharedSingleton 14 | { 15 | static GlobalHolder *sharedSingleton; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | if (!sharedSingleton) { 19 | sharedSingleton = [[GlobalHolder alloc] init]; 20 | } 21 | }); 22 | return sharedSingleton; 23 | } 24 | 25 | - (instancetype)init 26 | { 27 | self = [super init]; 28 | return self; 29 | } 30 | 31 | - (void)recoverFromLocal 32 | { 33 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; 34 | self.bestScore = [userDefaults integerForKey:@"BestScore"]; 35 | } 36 | 37 | - (void)backupToLocal 38 | { 39 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; 40 | [userDefaults setInteger:self.bestScore forKey:@"BestScore"]; 41 | [userDefaults synchronize]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Zhiya Zang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bubble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.zangzhiya.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | 疯狂捏泡泡 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 15 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | gamekit 33 | 34 | UIStatusBarHidden 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bubble/GameViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GameViewController.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "GameViewController.h" 10 | #import "MenuScene.h" 11 | 12 | @implementation GameViewController 13 | 14 | - (void)viewDidLoad 15 | { 16 | [super viewDidLoad]; 17 | 18 | SKView *skView = (SKView *)self.view; 19 | // if (DEBUG) { 20 | // skView.showsFPS = YES; 21 | // skView.showsNodeCount = YES; 22 | // } 23 | skView.ignoresSiblingOrder = YES; 24 | 25 | CGSize size = [UIScreen mainScreen].bounds.size; 26 | MenuScene *menuScene = [[MenuScene alloc] initWithSize:size]; 27 | menuScene.scaleMode = SKSceneScaleModeAspectFill; 28 | [skView presentScene:menuScene]; 29 | } 30 | 31 | - (BOOL)shouldAutorotate 32 | { 33 | return YES; 34 | } 35 | 36 | - (NSUInteger)supportedInterfaceOrientations 37 | { 38 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 39 | return UIInterfaceOrientationMaskAllButUpsideDown; 40 | } else { 41 | return UIInterfaceOrientationMaskAll; 42 | } 43 | } 44 | 45 | - (void)didReceiveMemoryWarning 46 | { 47 | [super didReceiveMemoryWarning]; 48 | } 49 | 50 | - (BOOL)prefersStatusBarHidden 51 | { 52 | return YES; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /bubble/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "GameCenterService.h" 11 | #import "GlobalHolder.h" 12 | #import 13 | #import "WXApi.h" 14 | 15 | @interface AppDelegate () 16 | 17 | @end 18 | 19 | @implementation AppDelegate 20 | 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 23 | { 24 | [[GlobalHolder sharedSingleton] recoverFromLocal]; 25 | [[GameCenterService sharedSingleton] authUserWithBlock:^(BOOL success, UIViewController *authViewController) { 26 | if (!success) { 27 | } else if (authViewController) { 28 | [self.window.rootViewController presentViewController:authViewController animated:YES completion:nil]; 29 | } 30 | }]; 31 | [WXApi registerApp:@"wxa2d0305b5da17aa1"]; 32 | return YES; 33 | } 34 | 35 | - (void)applicationWillResignActive:(UIApplication *)application 36 | { 37 | } 38 | 39 | - (void)applicationDidEnterBackground:(UIApplication *)application 40 | { 41 | } 42 | 43 | - (void)applicationWillEnterForeground:(UIApplication *)application 44 | { 45 | } 46 | 47 | - (void)applicationDidBecomeActive:(UIApplication *)application 48 | { 49 | } 50 | 51 | - (void)applicationWillTerminate:(UIApplication *)application 52 | { 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /bubble/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 疯狂捏泡泡 - 让强迫症停不下来的游戏 2 | ===== 3 | 4 | 5 | 6 | ## 截屏 7 | 8 | 9 | 10 | 11 | 12 | ## 构建 13 | 疯狂捏泡泡使用[Cocoapods](https://github.com/CocoaPods/CocoaPods)构建 14 | 15 | ## 许可证 16 | 17 | This code is distributed under the terms and conditions of the MIT license. 18 | 19 | ``` 20 | MIT License 21 | 22 | Copyright (c) 2018 Zhiya Zang 23 | 24 | Permission is hereby granted, free of charge, to any person obtaining a copy 25 | of this software and associated documentation files (the "Software"), to deal 26 | in the Software without restriction, including without limitation the rights 27 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 28 | copies of the Software, and to permit persons to whom the Software is 29 | furnished to do so, subject to the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be included in all 32 | copies or substantial portions of the Software. 33 | 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 35 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 36 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 37 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 38 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 39 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 40 | SOFTWARE. 41 | ``` 42 | -------------------------------------------------------------------------------- /bubble/BubbleNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // BubbleNode.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "BubbleNode.h" 10 | 11 | @interface BubbleNode () 12 | 13 | @property (strong, nonatomic) SKSpriteNode *bubbleNormalNode; 14 | @property (strong, nonatomic) SKSpriteNode *bubbleFlatNode; 15 | 16 | @end 17 | 18 | @implementation BubbleNode 19 | 20 | - (instancetype)initWithNormalFile:(NSString *)normarlFile flatFile:(NSString *)flatFile 21 | { 22 | self = [super init]; 23 | if (self) { 24 | self.userInteractionEnabled = YES; 25 | self.bubbleNormalNode = [SKSpriteNode spriteNodeWithImageNamed:normarlFile]; 26 | self.bubbleNormalNode.name = @"BubbleNormal"; 27 | self.bubbleFlatNode = [SKSpriteNode spriteNodeWithImageNamed:flatFile]; 28 | self.bubbleFlatNode.name = @"BubbleFlat"; 29 | [self addChild:self.bubbleFlatNode]; 30 | [self addChild:self.bubbleNormalNode]; 31 | self.status = BUBBLE_STATUS_NORMAL; 32 | } 33 | return self; 34 | } 35 | 36 | - (instancetype)init 37 | { 38 | @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Must use initWithNormalFile:flatFile: instead." userInfo:nil]; 39 | } 40 | 41 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 42 | { 43 | if (self.status == BUBBLE_STATUS_FlAT) { 44 | return; 45 | } 46 | for (UITouch *touch in touches) { 47 | CGPoint touchLocation = [touch locationInNode:self]; 48 | SKNode *node = [self nodeAtPoint:touchLocation]; 49 | if (node == self.bubbleNormalNode) { 50 | self.status = BUBBLE_STATUS_FlAT; 51 | [self onBubbleClick]; 52 | } 53 | } 54 | } 55 | 56 | - (void)onBubbleClick 57 | { 58 | 59 | } 60 | 61 | - (void)setSize:(CGSize)size 62 | { 63 | self.bubbleNormalNode.size = size; 64 | self.bubbleFlatNode.size = size; 65 | super.size = size; 66 | } 67 | 68 | - (void)setStatus:(BUBBLE_STATUS)status 69 | { 70 | _status = status; 71 | if (self.status == BUBBLE_STATUS_NORMAL) { 72 | self.bubbleNormalNode.hidden = NO; 73 | self.bubbleFlatNode.hidden = YES; 74 | } else if (self.status == BUBBLE_STATUS_FlAT) { 75 | self.bubbleNormalNode.hidden = YES; 76 | self.bubbleFlatNode.hidden = NO; 77 | } 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /bubble/GameCenterService.m: -------------------------------------------------------------------------------- 1 | // 2 | // GameCenterService.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/28/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "GameCenterService.h" 10 | #import 11 | 12 | @interface GameCenterService () 13 | 14 | @end 15 | 16 | @implementation GameCenterService 17 | 18 | + (GameCenterService *)sharedSingleton 19 | { 20 | static GameCenterService *sharedSingleton; 21 | static dispatch_once_t onceToken = 0; 22 | dispatch_once(&onceToken, ^{ 23 | if (!sharedSingleton) { 24 | sharedSingleton = [[self alloc] init]; 25 | } 26 | }); 27 | 28 | return sharedSingleton; 29 | } 30 | 31 | - (instancetype)init 32 | { 33 | self = [super init]; 34 | return self; 35 | } 36 | 37 | - (void)authUserWithBlock:(AuthUserBlock)block 38 | { 39 | GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; 40 | if (localPlayer.authenticated == NO) { 41 | localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) { 42 | if (!error) { 43 | block(YES, nil); 44 | } else { 45 | block(NO, viewController); 46 | } 47 | }; 48 | } else { 49 | block(YES, nil); 50 | } 51 | } 52 | 53 | - (void)reportBestScore:(NSInteger)score block:(ReportScoreBlock)block 54 | { 55 | GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier: @"Bubble_BestScore"]; 56 | scoreReporter.value = score; 57 | scoreReporter.context = 0; 58 | 59 | NSArray *scores = @[scoreReporter]; 60 | [GKScore reportScores:scores withCompletionHandler:^(NSError *error) { 61 | if (block) { 62 | if (!error) { 63 | block(YES); 64 | } else { 65 | block(NO); 66 | } 67 | } 68 | }]; 69 | } 70 | 71 | - (void)showLeaderboardWithTarget:(UIViewController *)target 72 | { 73 | GKGameCenterViewController *leaderboardViewController = [[GKGameCenterViewController alloc] init]; 74 | __weak __typeof(self) wself = self; 75 | leaderboardViewController.gameCenterDelegate = wself; 76 | leaderboardViewController.viewState = GKGameCenterViewControllerStateLeaderboards; 77 | leaderboardViewController.leaderboardIdentifier = @"Bubble_BestScore"; 78 | [target presentViewController:leaderboardViewController animated:YES completion:nil]; 79 | } 80 | 81 | #pragma mark - GKGameCenterControllerDelegate 82 | 83 | - (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController 84 | { 85 | [gameCenterViewController dismissViewControllerAnimated:YES completion:nil]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /bubble/BubblePoolService.m: -------------------------------------------------------------------------------- 1 | // 2 | // BubblePoolService.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/28/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "BubblePoolService.h" 10 | #import "NormalBubbleNode.h" 11 | #import "BombBubbleNode.h" 12 | 13 | @interface BubblePoolService () 14 | 15 | @property (strong, nonatomic) NSMutableArray *bubblePool; 16 | 17 | @end 18 | 19 | @implementation BubblePoolService 20 | 21 | + (BubblePoolService *)sharedSingleton 22 | { 23 | static BubblePoolService *sharedSingleton; 24 | static dispatch_once_t onceToken = 0; 25 | dispatch_once(&onceToken, ^{ 26 | if (!sharedSingleton) { 27 | sharedSingleton = [[BubblePoolService alloc] init]; 28 | } 29 | }); 30 | return sharedSingleton; 31 | } 32 | 33 | - (instancetype)init 34 | { 35 | self = [super init]; 36 | if (self) { 37 | _bubblePool = [[NSMutableArray alloc] init]; 38 | } 39 | return self; 40 | } 41 | 42 | - (NormalBubbleNode *)normalBubble 43 | { 44 | return (NormalBubbleNode *)[self bubbleWithType:BUBBLE_TYPE_NORMAL]; 45 | } 46 | 47 | - (BombBubbleNode *)bombBubble 48 | { 49 | return (BombBubbleNode *)[self bubbleWithType:BUBBLE_TYPE_BOMB]; 50 | } 51 | 52 | - (BubbleNode *)bubbleWithType:(BUBBLE_TYPE)type 53 | { 54 | __block BubbleNode *bubbleNode = nil; 55 | [self.bubblePool enumerateObjectsUsingBlock:^(BubbleNode *bubbleItem, NSUInteger idx, BOOL *stop) { 56 | if (bubbleItem.type == type && bubbleItem.poolStatus == BUBBLE_POOL_STATUS_AVAILABLE) { 57 | bubbleNode = bubbleItem; 58 | *stop = YES; 59 | } 60 | }]; 61 | if (bubbleNode) { 62 | bubbleNode.poolStatus = BUBBLE_POOL_STATUS_UNAVAILABLE; 63 | bubbleNode.status = BUBBLE_STATUS_NORMAL; 64 | return bubbleNode; 65 | } 66 | if (type == BUBBLE_TYPE_BOMB) { 67 | BombBubbleNode *bombBubbleNode = [[BombBubbleNode alloc] init]; 68 | bombBubbleNode.poolStatus = BUBBLE_POOL_STATUS_UNAVAILABLE; 69 | bombBubbleNode.poolIndex = self.bubblePool.count; 70 | [self.bubblePool addObject:bombBubbleNode]; 71 | return bombBubbleNode; 72 | } 73 | NormalBubbleNode *normalBubbleNode = [[NormalBubbleNode alloc] init]; 74 | normalBubbleNode.poolStatus = BUBBLE_POOL_STATUS_UNAVAILABLE; 75 | normalBubbleNode.poolIndex = self.bubblePool.count; 76 | [self.bubblePool addObject:normalBubbleNode]; 77 | return normalBubbleNode; 78 | } 79 | 80 | - (void)releaseBubbleWithIndex:(NSInteger)index 81 | { 82 | [self.bubblePool enumerateObjectsUsingBlock:^(BubbleNode *bubbleItem, NSUInteger idx, BOOL *stop) { 83 | if (bubbleItem.poolIndex == index) { 84 | bubbleItem.poolStatus = BUBBLE_POOL_STATUS_AVAILABLE; 85 | *stop = YES; 86 | } 87 | }]; 88 | } 89 | 90 | - (void)resetPool 91 | { 92 | [self.bubblePool enumerateObjectsUsingBlock:^(BubbleNode *bubbleItem, NSUInteger idx, BOOL *stop) { 93 | if (![NSThread isMainThread]) { 94 | dispatch_async(dispatch_get_main_queue(), ^{ 95 | [bubbleItem removeFromParent]; 96 | }); 97 | } else { 98 | [bubbleItem removeFromParent]; 99 | } 100 | }]; 101 | [self.bubblePool removeAllObjects]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /bubble/WXApi/WXApi.h: -------------------------------------------------------------------------------- 1 | // 2 | // MMApi.h 3 | // ApiClient 4 | // 5 | // Created by Tencent on 12-2-28. 6 | // Copyright (c) 2012年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "WXApiObject.h" 12 | 13 | #pragma mark - 14 | /*! @brief 接收并处理来至微信终端程序的事件消息 15 | * 16 | * 接收并处理来至微信终端程序的事件消息,期间微信界面会切换到第三方应用程序。 17 | * WXApiDelegate 会在handleOpenURL中使用并触发。 18 | */ 19 | @protocol WXApiDelegate 20 | 21 | @optional 22 | 23 | /*! @brief 收到一个来自微信的请求,处理完后调用sendResp 24 | * 25 | * 收到一个来自微信的请求,异步处理完成后必须调用sendResp发送处理结果给微信。 26 | * 可能收到的请求有GetMessageFromWXReq、ShowMessageFromWXReq等。 27 | * @param req 具体请求内容,是自动释放的 28 | */ 29 | -(void) onReq:(BaseReq*)req; 30 | 31 | /*! @brief 发送一个sendReq后,收到微信的回应 32 | * 33 | * 收到一个来自微信的处理结果。调用一次sendReq后会收到onResp。 34 | * 可能收到的处理结果有SendMessageToWXResp、SendAuthResp等。 35 | * @param resp具体的回应内容,是自动释放的 36 | */ 37 | -(void) onResp:(BaseResp*)resp; 38 | 39 | @end 40 | 41 | #pragma mark - 42 | 43 | /*! @brief 微信Api接口函数 44 | * 45 | * 该类封装了微信终端SDK的所有接口 46 | */ 47 | @interface WXApi : NSObject 48 | 49 | /*! @brief WXApi的成员函数,在微信终端程序中注册第三方应用。 50 | * 51 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 52 | * @param appid 微信开发者ID 53 | * @return 成功返回YES,失败返回NO。 54 | */ 55 | +(BOOL) registerApp:(NSString *)appid; 56 | 57 | /*! @brief WXApi的成员函数,在微信终端程序中注册第三方应用。 58 | * 59 | * 需要在每次启动第三方应用程序时调用。第一次调用后,会在微信的可用应用列表中出现。 60 | * @param appid 微信开发者ID 61 | * @param appdesc 应用附加信息,长度不超过1024字节 62 | * @return 成功返回YES,失败返回NO。 63 | */ 64 | +(BOOL) registerApp:(NSString *)appid withDescription:(NSString *)appdesc; 65 | 66 | /*! @brief 处理微信通过URL启动App时传递的数据 67 | * 68 | * 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用。 69 | * @param url 启动App的URL 70 | * @param delegate WXApiDelegate对象,用来接收微信触发的消息。 71 | * @return 成功返回YES,失败返回NO。 72 | */ 73 | +(BOOL) handleOpenURL:(NSURL *) url delegate:(id) delegate; 74 | 75 | /*! @brief 检查微信是否已被用户安装 76 | * 77 | * @return 微信已安装返回YES,未安装返回NO。 78 | */ 79 | +(BOOL) isWXAppInstalled; 80 | 81 | /*! @brief 判断当前微信的版本是否支持OpenApi 82 | * 83 | * @return 支持返回YES,不支持返回NO。 84 | */ 85 | +(BOOL) isWXAppSupportApi; 86 | 87 | /*! @brief 获取微信的itunes安装地址 88 | * 89 | * @return 微信的安装地址字符串。 90 | */ 91 | +(NSString *) getWXAppInstallUrl; 92 | 93 | /*! @brief 获取当前微信SDK的版本号 94 | * 95 | * @return 返回当前微信SDK的版本号 96 | */ 97 | +(NSString *) getApiVersion; 98 | 99 | /*! @brief 打开微信 100 | * 101 | * @return 成功返回YES,失败返回NO。 102 | */ 103 | +(BOOL) openWXApp; 104 | 105 | /*! @brief 发送请求到微信,等待微信返回onResp 106 | * 107 | * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型 108 | * SendMessageToWXReq。 109 | * @param req 具体的发送请求,在调用函数后,请自己释放。 110 | * @return 成功返回YES,失败返回NO。 111 | */ 112 | +(BOOL) sendReq:(BaseReq*)req; 113 | 114 | /*! @brief 收到微信onReq的请求,发送对应的应答给微信,并切换到微信界面 115 | * 116 | * 函数调用后,会切换到微信的界面。第三方应用程序收到微信onReq的请求,异步处理该请求,完成后必须调用该函数。可能发送的相应有 117 | * GetMessageFromWXResp、ShowMessageFromWXResp等。 118 | * @param resp 具体的应答内容,调用函数后,请自己释放 119 | * @return 成功返回YES,失败返回NO。 120 | */ 121 | +(BOOL) sendResp:(BaseResp*)resp; 122 | 123 | /*! @brief 发送请求到微信(安全方式),等待微信返回onResp 124 | * 125 | * 函数调用后,会切换到微信的界面。第三方应用程序等待微信返回onResp。微信在异步处理完成后一定会调用onResp。支持以下类型 126 | * SendAuthReq、PayReq。 127 | * @param req 具体的发送请求,在调用函数后,请自己释放。 128 | * @return 成功返回YES,失败返回NO。 129 | */ 130 | +(BOOL) safeSendReq:(BaseReq*)req; 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /bubble/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 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 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /bubble/MenuScene.m: -------------------------------------------------------------------------------- 1 | // 2 | // MenuScene.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "MenuScene.h" 10 | #import "GameScene.h" 11 | #import "GameCenterService.h" 12 | #import "GlobalHolder.h" 13 | #import "WXApi.h" 14 | 15 | @interface MenuScene () 16 | 17 | @property (strong, nonatomic) SKSpriteNode *menuBackground; 18 | @property (strong, nonatomic) SKSpriteNode *startButton; 19 | @property (strong, nonatomic) SKSpriteNode *starButton; 20 | @property (strong, nonatomic) SKSpriteNode *leaderboardButton; 21 | @property (strong, nonatomic) SKSpriteNode *shareButton; 22 | @property (strong, nonatomic) SKLabelNode *scoreLabel; 23 | @property (strong, nonatomic) SKAction *playPopSoundAction; 24 | 25 | @end 26 | 27 | @implementation MenuScene 28 | 29 | - (void)didMoveToView:(SKView *)view 30 | { 31 | self.playPopSoundAction = [SKAction playSoundFileNamed:@"PopSound.mp3" waitForCompletion:YES]; 32 | [self addChildren]; 33 | } 34 | 35 | - (void)addChildren 36 | { 37 | SKNode *backgroundNode = [SKSpriteNode spriteNodeWithImageNamed:@"Background"]; 38 | backgroundNode.position = CGPointMake(CGRectGetMidX(self.scene.frame), CGRectGetMidY(self.scene.frame)); 39 | backgroundNode.zPosition = 10; 40 | 41 | SKSpriteNode *titleLogo = [SKSpriteNode spriteNodeWithImageNamed:@"TitleLogo"]; 42 | titleLogo.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame) + 160); 43 | titleLogo.zPosition = 15; 44 | titleLogo.size = CGSizeMake(242, 66); 45 | 46 | self.menuBackground = [SKSpriteNode spriteNodeWithImageNamed:@"MenuBackground"]; 47 | self.menuBackground.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame) - 50); 48 | self.menuBackground.zPosition = 20; 49 | self.menuBackground.size = CGSizeMake(254, 298); 50 | 51 | SKLabelNode *boardTitleLabel = [SKLabelNode labelNodeWithFontNamed:@"STHeitiTC-Light"]; 52 | boardTitleLabel.text = @"最高分"; 53 | boardTitleLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:85 / 255.0f blue:85 / 255.0f alpha:1]; 54 | boardTitleLabel.fontSize = 26; 55 | boardTitleLabel.position = CGPointMake(0, 80); 56 | boardTitleLabel.zPosition = 21; 57 | 58 | self.scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"ChalkboardSE-Bold"]; 59 | if ([GlobalHolder sharedSingleton].bestScore > 0) { 60 | self.scoreLabel.text = [NSString stringWithFormat:@"%ld", (long)[GlobalHolder sharedSingleton].bestScore]; 61 | } else { 62 | self.scoreLabel.text = @"----"; 63 | } 64 | self.scoreLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:163 / 255.0f blue:79 / 255.0f alpha:1]; 65 | self.scoreLabel.fontSize = 32; 66 | self.scoreLabel.position = CGPointMake(0, 45); 67 | self.scoreLabel.zPosition = 22; 68 | 69 | self.startButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonStart"]; 70 | self.startButton.position = CGPointMake(0, -10); 71 | self.startButton.zPosition = 23; 72 | self.startButton.size = CGSizeMake(160, 50); 73 | 74 | self.starButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonStar"]; 75 | self.starButton.position = CGPointMake(-60, -90); 76 | self.starButton.zPosition = 24; 77 | self.starButton.size = CGSizeMake(30, 30); 78 | 79 | self.leaderboardButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonLeaderboard"]; 80 | self.leaderboardButton.position = CGPointMake(0, -95); 81 | self.leaderboardButton.zPosition = 25; 82 | self.leaderboardButton.size = CGSizeMake(30, 30); 83 | 84 | self.shareButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonShare"]; 85 | self.shareButton.position = CGPointMake(60, -90); 86 | self.shareButton.zPosition = 26; 87 | self.shareButton.size = CGSizeMake(20, 30); 88 | 89 | [self addChild:backgroundNode]; 90 | [self addChild:titleLogo]; 91 | [self addChild:self.menuBackground]; 92 | [self.menuBackground addChild:boardTitleLabel]; 93 | [self.menuBackground addChild:self.scoreLabel]; 94 | [self.menuBackground addChild:self.startButton]; 95 | [self.menuBackground addChild:self.starButton]; 96 | [self.menuBackground addChild:self.leaderboardButton]; 97 | [self.menuBackground addChild:self.shareButton]; 98 | } 99 | 100 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 101 | { 102 | for (UITouch *touch in touches) { 103 | CGPoint touchLocation = [touch locationInNode:self.menuBackground]; 104 | SKNode *node = [self.menuBackground nodeAtPoint:touchLocation]; 105 | if (node == self.startButton) { 106 | [self playPopSoundWithBlock:^{ 107 | CGSize size = [UIScreen mainScreen].bounds.size; 108 | GameScene *gameScene = [[GameScene alloc] initWithSize:size]; 109 | gameScene.scaleMode = SKSceneScaleModeAspectFill; 110 | [self.scene.view presentScene:gameScene]; 111 | }]; 112 | } else if (node == self.starButton) { 113 | [self playPopSoundWithBlock:^{ 114 | NSString *urlStr = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=946285061"; 115 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]]; 116 | }]; 117 | } else if (node == self.leaderboardButton) { 118 | [self playPopSoundWithBlock:^{ 119 | [[GameCenterService sharedSingleton] showLeaderboardWithTarget:self.view.window.rootViewController]; 120 | }]; 121 | } else if (node == self.shareButton) { 122 | [self playPopSoundWithBlock:^{ 123 | [self shareAskWithWeChat:WXSceneTimeline]; 124 | }]; 125 | } 126 | } 127 | } 128 | 129 | - (void)playPopSoundWithBlock:(void (^)())block 130 | { 131 | [self runAction:self.playPopSoundAction completion:^{ 132 | if (block) { 133 | block(); 134 | } 135 | }]; 136 | } 137 | 138 | #pragma mark ShareWeChat 139 | 140 | - (void)shareAskWithWeChat:(int)scene 141 | { 142 | if ([WXApi isWXAppInstalled] && [WXApi isWXAppSupportApi]) { 143 | WXWebpageObject *ext = [WXWebpageObject object]; 144 | ext.webpageUrl = @"http://mp.weixin.qq.com/mp/redirect?url=https://itunes.apple.com/cn/app/id946285061?src=weixinshare"; 145 | 146 | NSInteger bestScore = [GlobalHolder sharedSingleton].bestScore; 147 | 148 | WXMediaMessage *message = [WXMediaMessage message]; 149 | message.mediaObject = ext; 150 | if (bestScore > 100) { 151 | message.title = [NSString stringWithFormat:@"一口气捏了%ld个泡泡,我就是任性", (long)bestScore]; 152 | } else { 153 | message.title = @"我爱捏泡泡,我就是任性"; 154 | } 155 | [message setThumbImage:[UIImage imageNamed:@"ShareIcon"]]; 156 | 157 | SendMessageToWXReq* req = [[SendMessageToWXReq alloc] init]; 158 | req.bText = NO; 159 | req.message = message; 160 | req.scene = scene; 161 | 162 | [WXApi sendReq:req]; 163 | } else { 164 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"无法分享" message:@"没有安装微信,无法使用微信分享" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil]; 165 | [alertView show]; 166 | } 167 | } 168 | 169 | @end 170 | -------------------------------------------------------------------------------- /bubble/ResultScene.m: -------------------------------------------------------------------------------- 1 | // 2 | // ResultScene.m 3 | // bubble 4 | // 5 | // Created by Zzy on 12/4/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "ResultScene.h" 10 | #import "GameScene.h" 11 | #import "MenuScene.h" 12 | #import "GameCenterService.h" 13 | #import "GlobalHolder.h" 14 | #import "WXApi/WXApi.h" 15 | 16 | @interface ResultScene () 17 | 18 | @property (strong, nonatomic) SKSpriteNode *menuBackground; 19 | @property (strong, nonatomic) SKLabelNode *scoreLabel; 20 | @property (strong, nonatomic) SKLabelNode *bestScoreLabel; 21 | @property (strong, nonatomic) SKSpriteNode *restartButton; 22 | @property (strong, nonatomic) SKSpriteNode *homeButton; 23 | @property (strong, nonatomic) SKSpriteNode *leaderboardButton; 24 | @property (strong, nonatomic) SKSpriteNode *shareButton; 25 | @property (strong, nonatomic) SKAction *playPopSoundAction; 26 | 27 | @end 28 | 29 | @implementation ResultScene 30 | 31 | - (void)didMoveToView:(SKView *)view 32 | { 33 | self.playPopSoundAction = [SKAction playSoundFileNamed:@"PopSound.mp3" waitForCompletion:YES]; 34 | 35 | [self addChildren]; 36 | } 37 | 38 | - (void)addChildren 39 | { 40 | SKNode *backgroundNode = [SKSpriteNode spriteNodeWithImageNamed:@"Background"]; 41 | backgroundNode.position = CGPointMake(CGRectGetMidX(self.scene.frame), CGRectGetMidY(self.scene.frame)); 42 | backgroundNode.zPosition = 10; 43 | 44 | SKSpriteNode *gameOverTitle = [SKSpriteNode spriteNodeWithImageNamed:@"TitleGameOver"]; 45 | gameOverTitle.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame) + 160); 46 | gameOverTitle.zPosition = 15; 47 | gameOverTitle.size = CGSizeMake(233, 65); 48 | 49 | self.menuBackground = [SKSpriteNode spriteNodeWithImageNamed:@"MenuBackground"]; 50 | self.menuBackground.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame) - 50); 51 | self.menuBackground.zPosition = 20; 52 | self.menuBackground.size = CGSizeMake(254, 298); 53 | 54 | SKLabelNode *scoreTitleLabel = [SKLabelNode labelNodeWithFontNamed:@"STHeitiTC-Light"]; 55 | scoreTitleLabel.text = @"得分"; 56 | scoreTitleLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeLeft; 57 | scoreTitleLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:85 / 255.0f blue:85 / 255.0f alpha:1]; 58 | scoreTitleLabel.fontSize = 22; 59 | scoreTitleLabel.position = CGPointMake(-80, 80); 60 | scoreTitleLabel.zPosition = 21; 61 | 62 | SKLabelNode *boardTitleLabel = [SKLabelNode labelNodeWithFontNamed:@"STHeitiTC-Light"]; 63 | boardTitleLabel.text = @"最高分"; 64 | boardTitleLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeLeft; 65 | boardTitleLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:85 / 255.0f blue:85 / 255.0f alpha:1]; 66 | boardTitleLabel.fontSize = 22; 67 | boardTitleLabel.position = CGPointMake(-80, 40); 68 | boardTitleLabel.zPosition = 21; 69 | 70 | self.scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"ChalkboardSE-Bold"]; 71 | self.scoreLabel.text = [NSString stringWithFormat:@"%ld", (long)self.score]; 72 | self.scoreLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:163 / 255.0f blue:79 / 255.0f alpha:1]; 73 | self.scoreLabel.fontSize = 28; 74 | self.scoreLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeRight; 75 | self.scoreLabel.position = CGPointMake(80, 80); 76 | self.scoreLabel.zPosition = 22; 77 | 78 | self.bestScoreLabel = [SKLabelNode labelNodeWithFontNamed:@"ChalkboardSE-Bold"]; 79 | if ([GlobalHolder sharedSingleton].bestScore > 0) { 80 | self.bestScoreLabel.text = [NSString stringWithFormat:@"%ld", (long)[GlobalHolder sharedSingleton].bestScore]; 81 | } else { 82 | self.bestScoreLabel.text = @"----"; 83 | } 84 | self.bestScoreLabel.fontColor = [SKColor colorWithRed:85 / 255.0f green:163 / 255.0f blue:79 / 255.0f alpha:1]; 85 | self.bestScoreLabel.fontSize = 28; 86 | self.bestScoreLabel.horizontalAlignmentMode = SKLabelHorizontalAlignmentModeRight; 87 | self.bestScoreLabel.position = CGPointMake(80, 40); 88 | self.bestScoreLabel.zPosition = 22; 89 | 90 | self.restartButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonRestart"]; 91 | self.restartButton.position = CGPointMake(0, -10); 92 | self.restartButton.zPosition = 23; 93 | self.restartButton.size = CGSizeMake(160, 50); 94 | 95 | self.homeButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonHome"]; 96 | self.homeButton.position = CGPointMake(-60, -90); 97 | self.homeButton.zPosition = 24; 98 | self.homeButton.size = CGSizeMake(27, 28); 99 | 100 | self.leaderboardButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonLeaderboard"]; 101 | self.leaderboardButton.position = CGPointMake(0, -95); 102 | self.leaderboardButton.zPosition = 25; 103 | self.leaderboardButton.size = CGSizeMake(30, 30); 104 | 105 | self.shareButton = [SKSpriteNode spriteNodeWithImageNamed:@"ButtonShare"]; 106 | self.shareButton.position = CGPointMake(60, -90); 107 | self.shareButton.zPosition = 26; 108 | self.shareButton.size = CGSizeMake(20, 30); 109 | 110 | [self addChild:backgroundNode]; 111 | [self addChild:gameOverTitle]; 112 | [self addChild:self.menuBackground]; 113 | [self.menuBackground addChild:scoreTitleLabel]; 114 | [self.menuBackground addChild:boardTitleLabel]; 115 | [self.menuBackground addChild:self.scoreLabel]; 116 | [self.menuBackground addChild:self.bestScoreLabel]; 117 | [self.menuBackground addChild:self.restartButton]; 118 | [self.menuBackground addChild:self.homeButton]; 119 | [self.menuBackground addChild:self.leaderboardButton]; 120 | [self.menuBackground addChild:self.shareButton]; 121 | } 122 | 123 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 124 | { 125 | for (UITouch *touch in touches) { 126 | CGPoint touchLocation = [touch locationInNode:self.menuBackground]; 127 | SKNode *node = [self.menuBackground nodeAtPoint:touchLocation]; 128 | if (node == self.restartButton) { 129 | [self playPopSoundWithBlock:^{ 130 | CGSize size = [UIScreen mainScreen].bounds.size; 131 | GameScene *gameScene = [[GameScene alloc] initWithSize:size]; 132 | gameScene.scaleMode = SKSceneScaleModeAspectFill; 133 | [self.scene.view presentScene:gameScene]; 134 | }]; 135 | } else if (node == self.homeButton) { 136 | [self playPopSoundWithBlock:^{ 137 | CGSize size = [UIScreen mainScreen].bounds.size; 138 | MenuScene *menuScene = [[MenuScene alloc] initWithSize:size]; 139 | menuScene.scaleMode = SKSceneScaleModeAspectFill; 140 | [self.scene.view presentScene:menuScene]; 141 | }]; 142 | } else if (node == self.leaderboardButton) { 143 | [self playPopSoundWithBlock:^{ 144 | [[GameCenterService sharedSingleton] showLeaderboardWithTarget:self.view.window.rootViewController]; 145 | }]; 146 | } else if (node == self.shareButton) { 147 | [self playPopSoundWithBlock:^{ 148 | [self shareAskWithWeChat:WXSceneTimeline]; 149 | }]; 150 | } 151 | } 152 | } 153 | 154 | - (void)playPopSoundWithBlock:(void (^)())block 155 | { 156 | [self runAction:self.playPopSoundAction completion:^{ 157 | if (block) { 158 | block(); 159 | } 160 | }]; 161 | } 162 | 163 | #pragma mark ShareWeChat 164 | 165 | - (void)shareAskWithWeChat:(int)scene 166 | { 167 | WXWebpageObject *ext = [WXWebpageObject object]; 168 | ext.webpageUrl = @"http://mp.weixin.qq.com/mp/redirect?url=https://itunes.apple.com/cn/app/id946285061?src=weixinshare"; 169 | 170 | NSInteger score = self.scoreLabel.text.integerValue; 171 | 172 | WXMediaMessage *message = [WXMediaMessage message]; 173 | message.mediaObject = ext; 174 | if (score > 100) { 175 | message.title = [NSString stringWithFormat:@"一口气捏了%ld个泡泡,我就是任性", (long)score]; 176 | } else { 177 | message.title = @"我爱捏泡泡,我就是任性"; 178 | } 179 | [message setThumbImage:[UIImage imageNamed:@"ShareIcon"]]; 180 | 181 | SendMessageToWXReq* req = [[SendMessageToWXReq alloc] init]; 182 | req.bText = NO; 183 | req.message = message; 184 | req.scene = scene; 185 | 186 | [WXApi sendReq:req]; 187 | } 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /bubble/GameScene.m: -------------------------------------------------------------------------------- 1 | // 2 | // GameScene.m 3 | // bubble 4 | // 5 | // Created by Zzy on 11/25/14. 6 | // Copyright (c) 2014 zangzhiya. All rights reserved. 7 | // 8 | 9 | #import "GameScene.h" 10 | #import "NormalBubbleNode.h" 11 | #import "BombBubbleNode.h" 12 | #import "GameCenterService.h" 13 | #import "BubblePoolService.h" 14 | #import "GlobalHolder.h" 15 | #import "ResultScene.h" 16 | 17 | typedef NS_OPTIONS(NSInteger, NODE_CATEGORY) { 18 | NODE_CATEGORY_BUBBLE = 0, 19 | NODE_CATEGORY_BORDER, 20 | }; 21 | 22 | @interface GameScene () 23 | 24 | @property (nonatomic) CGFloat roadWidth; 25 | @property (nonatomic) CGFloat nodeSpeed; 26 | @property (nonatomic) NSInteger bubbleCount; 27 | @property (nonatomic, getter = isResultNodeDisplayed) BOOL resultNodeDisplayed; 28 | @property (nonatomic, getter = isStopped) BOOL stopped; 29 | @property (nonatomic, getter = isGamePaused) BOOL gamePaused; 30 | 31 | @property (strong, nonatomic) SKNode *ballBackgroundNode; 32 | @property (strong, nonatomic) SKLabelNode *scoreLabel; 33 | @property (strong, nonatomic) SKSpriteNode *coverNode; 34 | @property (strong, nonatomic) SKAction *playBombSoundAction; 35 | 36 | @end 37 | 38 | @implementation GameScene 39 | 40 | static const NSInteger ROAD_NUM = 4; 41 | static const NSInteger BUBBLE_SIZE = 70; 42 | static const NSInteger ORIGIN_TIME = 6; 43 | static const NSInteger MAX_SPEED = 3; 44 | 45 | - (void)didMoveToView:(SKView *)view 46 | { 47 | __weak __typeof(self) wself = self; 48 | self.physicsWorld.gravity = CGVectorMake(0, 0); 49 | self.physicsWorld.contactDelegate = wself; 50 | self.nodeSpeed = 1; 51 | self.roadWidth = self.scene.frame.size.width / ROAD_NUM; 52 | self.playBombSoundAction = [SKAction playSoundFileNamed:@"BombSound.mp3" waitForCompletion:YES]; 53 | 54 | [self createAction]; 55 | 56 | [self addChildren]; 57 | } 58 | 59 | - (void)addChildren 60 | { 61 | SKNode *backgroundNode = [SKSpriteNode spriteNodeWithImageNamed:@"Background"]; 62 | backgroundNode.position = CGPointMake(CGRectGetMidX(self.scene.frame), CGRectGetMidY(self.scene.frame)); 63 | backgroundNode.zPosition = 10; 64 | 65 | self.ballBackgroundNode = [SKNode node]; 66 | self.ballBackgroundNode.zPosition = 20; 67 | 68 | SKSpriteNode *borderNode = [SKSpriteNode spriteNodeWithColor:[SKColor clearColor] size:CGSizeMake(self.scene.size.width, 1)]; 69 | borderNode.name = @"Border"; 70 | borderNode.position = CGPointMake(CGRectGetMidX(self.scene.frame), 0); 71 | borderNode.zPosition = 30; 72 | borderNode.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:borderNode.size]; 73 | borderNode.physicsBody.categoryBitMask = NODE_CATEGORY_BORDER; 74 | borderNode.physicsBody.contactTestBitMask = NODE_CATEGORY_BORDER | NODE_CATEGORY_BUBBLE; 75 | borderNode.physicsBody.collisionBitMask = NODE_CATEGORY_BORDER; 76 | 77 | self.scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"ChalkboardSE-Bold"]; 78 | self.scoreLabel.text = @"0"; 79 | self.scoreLabel.fontColor = [SKColor whiteColor]; 80 | self.scoreLabel.fontSize = 32; 81 | self.scoreLabel.position = CGPointMake(CGRectGetMidX(self.scene.frame), self.scene.frame.size.height - self.scoreLabel.frame.size.height - 50); 82 | self.scoreLabel.zPosition = 100; 83 | 84 | [self addChild:backgroundNode]; 85 | [self addChild:self.ballBackgroundNode]; 86 | [self addChild:borderNode]; 87 | [self addChild:self.scoreLabel]; 88 | } 89 | 90 | - (void)createBubbleNode 91 | { 92 | for (NSInteger i = 0; i < ROAD_NUM; i++) { 93 | CGSize bubbleSize = CGSizeMake(BUBBLE_SIZE, BUBBLE_SIZE); 94 | CGFloat offsetX = i * self.roadWidth + self.roadWidth / 2; 95 | BubbleNode *bubbleNode = nil; 96 | if (arc4random() % 10 == 0) { 97 | BombBubbleNode *bombBubbleNode = [[BubblePoolService sharedSingleton] bombBubble]; 98 | bombBubbleNode.delegate = self; 99 | bubbleNode = (BubbleNode *)bombBubbleNode; 100 | } else { 101 | NormalBubbleNode *normalBubbleNode = [[BubblePoolService sharedSingleton] normalBubble]; 102 | normalBubbleNode.delegate = self; 103 | bubbleNode = (BubbleNode *)normalBubbleNode; 104 | } 105 | bubbleNode.name = @"Bubble"; 106 | bubbleNode.size = bubbleSize; 107 | bubbleNode.speed = self.nodeSpeed; 108 | bubbleNode.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:bubbleNode.size]; 109 | bubbleNode.physicsBody.categoryBitMask = NODE_CATEGORY_BUBBLE; 110 | bubbleNode.physicsBody.contactTestBitMask = NODE_CATEGORY_BORDER | NODE_CATEGORY_BUBBLE; 111 | bubbleNode.physicsBody.collisionBitMask = NODE_CATEGORY_BUBBLE; 112 | bubbleNode.position = CGPointMake(offsetX, self.scene.frame.size.height + bubbleSize.height / 2); 113 | SKAction *bubbleMoveAction = [SKAction moveToY:-bubbleSize.height / 2 duration:ORIGIN_TIME]; 114 | SKAction *bubbleRemoveAction = [SKAction runBlock:^{ 115 | self.bubbleCount++; 116 | [self updateLevel]; 117 | [bubbleNode removeFromParent]; 118 | [[BubblePoolService sharedSingleton] releaseBubbleWithIndex:bubbleNode.poolIndex]; 119 | }]; 120 | [bubbleNode runAction:[SKAction sequence:@[bubbleMoveAction, bubbleRemoveAction]]]; 121 | [self.ballBackgroundNode addChild:bubbleNode]; 122 | } 123 | } 124 | 125 | - (void)createAction 126 | { 127 | CGFloat gap = self.scene.frame.size.width / ROAD_NUM; 128 | NSTimeInterval duration = gap / ((self.scene.frame.size.height + gap) / (ORIGIN_TIME / self.nodeSpeed)); 129 | SKAction *createBubbleAction = [SKAction runBlock:^{ 130 | [self createBubbleNode]; 131 | }]; 132 | SKAction *waitAction = [SKAction waitForDuration:duration]; 133 | SKAction *repeatAction = [SKAction runBlock:^{ 134 | [self createAction]; 135 | }]; 136 | SKAction *sequence = [SKAction sequence:@[createBubbleAction, waitAction, repeatAction]]; 137 | [self runAction:sequence]; 138 | } 139 | 140 | - (void)updateLevel 141 | { 142 | CGFloat speed = 0.1 * self.bubbleCount / (ROAD_NUM * 20) + 1; 143 | if (speed < MAX_SPEED && speed - self.nodeSpeed >= 0.1) { 144 | self.nodeSpeed = speed; 145 | [self.ballBackgroundNode enumerateChildNodesWithName:@"Bubble" usingBlock:^(SKNode *node, BOOL *stop) { 146 | node.speed = self.nodeSpeed; 147 | }]; 148 | } 149 | } 150 | 151 | - (void)gameOver 152 | { 153 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 154 | NSInteger score = self.scoreLabel.text.integerValue; 155 | if (score > [GlobalHolder sharedSingleton].bestScore) { 156 | [GlobalHolder sharedSingleton].bestScore = score; 157 | [[GlobalHolder sharedSingleton] backupToLocal]; 158 | } 159 | [[GameCenterService sharedSingleton] reportBestScore:score block:nil]; 160 | [[BubblePoolService sharedSingleton] resetPool]; 161 | [self resetScene]; 162 | 163 | CGSize size = [UIScreen mainScreen].bounds.size; 164 | ResultScene *resultScene = [[ResultScene alloc] initWithSize:size]; 165 | resultScene.score = score; 166 | resultScene.scaleMode = SKSceneScaleModeAspectFill; 167 | dispatch_async(dispatch_get_main_queue(), ^{ 168 | [self.scene.view presentScene:resultScene]; 169 | }); 170 | }); 171 | } 172 | 173 | - (void)stopGame 174 | { 175 | if (!self.coverNode) { 176 | self.coverNode = [SKSpriteNode spriteNodeWithColor:[SKColor clearColor] size:self.scene.size]; 177 | self.coverNode.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)); 178 | self.coverNode.zPosition = 200; 179 | [self addChild:self.coverNode]; 180 | } 181 | if (!self.isStopped) { 182 | self.stopped = YES; 183 | [self removeAllActions]; 184 | [self.ballBackgroundNode.children enumerateObjectsUsingBlock:^(SKNode * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 185 | [obj removeAllActions]; 186 | }]; 187 | } 188 | } 189 | 190 | - (void)bubbleWink:(BubbleNode *)bubbleNode completion:(void (^)())block 191 | { 192 | SKAction *fadeInAction = [SKAction fadeInWithDuration:0.2]; 193 | SKAction *fadeOutAction = [SKAction fadeOutWithDuration:0.2]; 194 | SKAction *waitAction = [SKAction waitForDuration:0.2]; 195 | SKAction *sequenceAction = [SKAction sequence:@[fadeOutAction, waitAction, fadeInAction, waitAction]]; 196 | SKAction *repeatAction = [SKAction sequence:@[sequenceAction, sequenceAction, sequenceAction]]; 197 | [bubbleNode runAction:repeatAction completion:^{ 198 | if (block) { 199 | block(); 200 | } 201 | }]; 202 | } 203 | 204 | - (void)resetScene 205 | { 206 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 207 | } 208 | 209 | #pragma mark - BombBubbleNodeDelegate 210 | 211 | - (void)bombBubbleNodeClick:(BombBubbleNode *)bombBubbleNode 212 | { 213 | [self stopGame]; 214 | [self runAction:self.playBombSoundAction]; 215 | [self bubbleWink:bombBubbleNode completion:^{ 216 | [self gameOver]; 217 | }]; 218 | } 219 | 220 | #pragma mark - NormalBubbleNodeDelegate 221 | 222 | - (void)normalBubbleNodeClick:(NormalBubbleNode *)normalBubbleNode 223 | { 224 | self.scoreLabel.text = [NSString stringWithFormat:@"%ld", (long)(self.scoreLabel.text.integerValue + self.speed * 10)]; 225 | } 226 | 227 | #pragma mark - ContractTest 228 | 229 | - (void)didBeginContact:(SKPhysicsContact *)contact 230 | { 231 | BubbleNode *bubbleNode = nil; 232 | if ([contact.bodyA.node.name isEqualToString:@"Bubble"] && [contact.bodyB.node.name isEqualToString:@"Border"]) { 233 | bubbleNode = (BubbleNode *)contact.bodyA.node; 234 | } else if ([contact.bodyA.node.name isEqualToString:@"Border"] && [contact.bodyB.node.name isEqualToString:@"Bubble"]) { 235 | bubbleNode = (BubbleNode *)contact.bodyB.node; 236 | } 237 | if (bubbleNode && bubbleNode.status == BUBBLE_STATUS_NORMAL && [bubbleNode isMemberOfClass:[NormalBubbleNode class]]) { 238 | [self stopGame]; 239 | [self bubbleWink:bubbleNode completion:^{ 240 | [self gameOver]; 241 | }]; 242 | } 243 | } 244 | 245 | @end 246 | -------------------------------------------------------------------------------- /bubble/WXApi/WXApiObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // MMApiObject.h 3 | // ApiClient 4 | // 5 | // Created by Tencent on 12-2-28. 6 | // Copyright (c) 2012年 Tencent. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | ///////////////////////////////////////////////////////////// 12 | 13 | enum WXErrCode { 14 | 15 | WXSuccess = 0, 16 | WXErrCodeCommon = -1, 17 | WXErrCodeUserCancel = -2, 18 | WXErrCodeSentFail = -3, 19 | WXErrCodeAuthDeny = -4, 20 | WXErrCodeUnsupport = -5, 21 | }; 22 | 23 | enum WXScene { 24 | 25 | WXSceneSession = 0, 26 | WXSceneTimeline = 1, 27 | WXSceneFavorite = 2, 28 | }; 29 | 30 | enum WXAPISupport { 31 | 32 | WXAPISupportSession = 0, 33 | }; 34 | 35 | /*! @brief 该类为微信终端SDK所有请求类的基类 36 | * 37 | */ 38 | @interface BaseReq : NSObject 39 | 40 | /** 请求类型 */ 41 | @property (nonatomic, assign) int type; 42 | 43 | /** 由用户微信号和AppID组成的唯一标识,发送请求时第三方程序必须填写,用于校验微信用户是否换号登录*/ 44 | @property (nonatomic, retain) NSString* openID; 45 | 46 | @end 47 | 48 | /*! @brief 该类为微信终端SDK所有响应类的基类 49 | * 50 | */ 51 | @interface BaseResp : NSObject 52 | /** 错误码 */ 53 | @property (nonatomic, assign) int errCode; 54 | /** 错误提示字符串 */ 55 | @property (nonatomic, retain) NSString *errStr; 56 | /** 响应类型 */ 57 | @property (nonatomic, assign) int type; 58 | 59 | @end 60 | 61 | @class WXMediaMessage; 62 | 63 | /*! @brief 第三方向微信终端发起支付的消息结构体 64 | * 65 | * 第三方向微信终端发起支付的消息结构体,微信终端处理后会向第三方返回处理结果 66 | * @see PayResp 67 | */ 68 | @interface PayReq : BaseReq 69 | 70 | /** 商家向财付通申请的商家id */ 71 | @property (nonatomic, retain) NSString *partnerId; 72 | /** 预支付订单 */ 73 | @property (nonatomic, retain) NSString *prepayId; 74 | /** 随机串,防重发 */ 75 | @property (nonatomic, retain) NSString *nonceStr; 76 | /** 时间戳,防重发 */ 77 | @property (nonatomic, assign) UInt32 timeStamp; 78 | /** 商家根据财付通文档填写的数据和签名 */ 79 | @property (nonatomic, retain) NSString *package; 80 | /** 商家根据微信开放平台文档对数据做的签名 */ 81 | @property (nonatomic, retain) NSString *sign; 82 | 83 | @end 84 | 85 | /*! @brief 微信终端返回给第三方的关于支付结果的结构体 86 | * 87 | * 微信终端返回给第三方的关于支付结果的结构体 88 | */ 89 | @interface PayResp : BaseResp 90 | 91 | /** 财付通返回给商家的信息 */ 92 | @property (nonatomic, retain) NSString *returnKey; 93 | 94 | @end 95 | 96 | /*! @brief 第三方程序向微信终端请求认证的消息结构 97 | * 98 | * 第三方程序要向微信申请认证,并请求某些权限,需要调用WXApi的sendReq成员函数, 99 | * 向微信终端发送一个SendAuthReq消息结构。微信终端处理完后会向第三方程序发送一个处理结果。 100 | * @see SendAuthResp 101 | */ 102 | @interface SendAuthReq : BaseReq 103 | /** 第三方程序要向微信申请认证,并请求某些权限,需要调用WXApi的sendReq成员函数,向微信终端发送一个SendAuthReq消息结构。微信终端处理完后会向第三方程序发送一个处理结果。 104 | * @see SendAuthResp 105 | * @note scope字符串长度不能超过1K 106 | */ 107 | @property (nonatomic, retain) NSString* scope; 108 | /** 第三方程序本身用来标识其请求的唯一性,最后跳转回第三方程序时,由微信终端回传。 109 | * @note state字符串长度不能超过1K 110 | */ 111 | @property (nonatomic, retain) NSString* state; 112 | @end 113 | 114 | /*! @brief 微信处理完第三方程序的认证和权限申请后向第三方程序回送的处理结果。 115 | * 116 | * 第三方程序要向微信申请认证,并请求某些权限,需要调用WXApi的sendReq成员函数,向微信终端发送一个SendAuthReq消息结构。 117 | * 微信终端处理完后会向第三方程序发送一个SendAuthResp。 118 | * @see onResp 119 | */ 120 | @interface SendAuthResp : BaseResp 121 | /** todo */ 122 | @property (nonatomic, retain) NSString* code; 123 | /** 第三方程序发送时用来标识其请求的唯一性的标志,由第三方程序调用sendReq时传入,由微信终端回传 124 | * @note state字符串长度不能超过1K 125 | */ 126 | @property (nonatomic, retain) NSString* state; 127 | @property (nonatomic, retain) NSString* lang; 128 | @property (nonatomic, retain) NSString* country; 129 | 130 | // @property (nonatomic, retain) NSString* userName; 131 | // @property (nonatomic, retain) NSString* token; 132 | // @property (nonatomic, retain) NSDate* expireDate; 133 | @end 134 | 135 | /*! @brief 第三方程序发送消息至微信终端程序的消息结构体 136 | * 137 | * 第三方程序向微信发送信息需要传入SendMessageToWXReq结构体,信息类型包括文本消息和多媒体消息, 138 | * 分别对应于text和message成员。调用该方法后,微信处理完信息会向第三方程序发送一个处理结果。 139 | * @see SendMessageToWXResp 140 | */ 141 | @interface SendMessageToWXReq : BaseReq 142 | /** 发送消息的文本内容 143 | * @note 文本长度必须大于0且小于10K 144 | */ 145 | @property (nonatomic, retain) NSString* text; 146 | /** 发送消息的多媒体内容 147 | * @see WXMediaMessage 148 | */ 149 | @property (nonatomic, retain) WXMediaMessage* message; 150 | /** 发送消息的类型,包括文本消息和多媒体消息两种,两者只能选择其一,不能同时发送文本和多媒体消息 */ 151 | @property (nonatomic, assign) BOOL bText; 152 | 153 | /** 发送的目标场景,可以选择发送到会话(WXSceneSession)或者朋友圈(WXSceneTimeline)。 默认发送到会话。 154 | * @see WXScene 155 | */ 156 | @property (nonatomic, assign) int scene; 157 | 158 | @end 159 | 160 | /*! @brief 微信终端向第三方程序返回的SendMessageToWXReq处理结果。 161 | * 162 | * 第三方程序向微信终端发送SendMessageToWXReq后,微信发送回来的处理结果,该结果用SendMessageToWXResp表示。 163 | */ 164 | @interface SendMessageToWXResp : BaseResp 165 | @property(nonatomic, retain) NSString* lang; 166 | @property(nonatomic, retain) NSString* country; 167 | @end 168 | 169 | /*! @brief 微信终端向第三方程序请求提供内容的消息结构体。 170 | * 171 | * 微信终端向第三方程序请求提供内容,微信终端会向第三方程序发送GetMessageFromWXReq消息结构体, 172 | * 需要第三方程序调用sendResp返回一个GetMessageFromWXResp消息结构体。 173 | */ 174 | @interface GetMessageFromWXReq : BaseReq 175 | @property (nonatomic, retain) NSString* lang; 176 | @property (nonatomic, retain) NSString* country; 177 | @end 178 | 179 | /*! @brief 微信终端向第三方程序请求提供内容,第三方程序向微信终端返回的消息结构体。 180 | * 181 | * 微信终端向第三方程序请求提供内容,第三方程序调用sendResp向微信终端返回一个GetMessageFromWXResp消息结构体。 182 | */ 183 | @interface GetMessageFromWXResp : BaseResp 184 | /** 向微信终端提供的文本内容 185 | @note 文本长度必须大于0且小于10K 186 | */ 187 | @property (nonatomic, retain) NSString* text; 188 | /** 向微信终端提供的多媒体内容。 189 | * @see WXMediaMessage 190 | */ 191 | @property (nonatomic, retain) WXMediaMessage* message; 192 | /** 向微信终端提供内容的消息类型,包括文本消息和多媒体消息两种,两者只能选择其一,不能同时发送文本和多媒体消息 */ 193 | @property (nonatomic, assign) BOOL bText; 194 | @end 195 | 196 | /*! @brief 微信通知第三方程序,要求第三方程序显示的消息结构体。 197 | * 198 | * 微信需要通知第三方程序显示或处理某些内容时,会向第三方程序发送ShowMessageFromWXReq消息结构体。 199 | * 第三方程序处理完内容后调用sendResp向微信终端发送ShowMessageFromWXResp。 200 | */ 201 | @interface ShowMessageFromWXReq : BaseReq 202 | /** 微信终端向第三方程序发送的要求第三方程序处理的多媒体内容 203 | * @see WXMediaMessage 204 | */ 205 | @property (nonatomic, retain) WXMediaMessage* message; 206 | @property (nonatomic, retain) NSString* lang; 207 | @property (nonatomic, retain) NSString* country; 208 | @end 209 | 210 | /*! @brief 微信通知第三方程序,要求第三方程序显示或处理某些消息,第三方程序处理完后向微信终端发送的处理结果。 211 | * 212 | * 微信需要通知第三方程序显示或处理某些内容时,会向第三方程序发送ShowMessageFromWXReq消息结构体。 213 | * 第三方程序处理完内容后调用sendResp向微信终端发送ShowMessageFromWXResp。 214 | */ 215 | @interface ShowMessageFromWXResp : BaseResp 216 | @end 217 | 218 | /*! @brief 微信终端打开第三方程序携带的消息结构体 219 | * 220 | * 微信向第三方发送的结构体,第三方不需要返回 221 | */ 222 | @interface LaunchFromWXReq : BaseReq 223 | @property (nonatomic, retain) WXMediaMessage* message; 224 | @property (nonatomic, retain) NSString* lang; 225 | @property (nonatomic, retain) NSString* country; 226 | @end 227 | 228 | 229 | #pragma mark - WXMediaMessage 230 | 231 | /*! @brief 多媒体消息结构体 232 | * 233 | * 用于微信终端和第三方程序之间传递消息的多媒体消息内容 234 | */ 235 | @interface WXMediaMessage : NSObject 236 | 237 | +(WXMediaMessage *) message; 238 | 239 | /** 标题 240 | * @note 长度不能超过512字节 241 | */ 242 | @property (nonatomic, retain) NSString *title; 243 | /** 描述内容 244 | * @note 长度不能超过1K 245 | */ 246 | @property (nonatomic, retain) NSString *description; 247 | /** 缩略图数据 248 | * @note 大小不能超过32K 249 | */ 250 | @property (nonatomic, retain) NSData *thumbData; 251 | /** todo 252 | * @note 长度不能超过64字节 253 | */ 254 | @property (nonatomic, retain) NSString *mediaTagName; 255 | /** 256 | * 257 | */ 258 | @property (nonatomic, retain) NSString *messageExt; 259 | @property (nonatomic, retain) NSString *messageAction; 260 | /** 多媒体数据对象,可以为WXImageObject,WXMusicObject,WXVideoObject,WXWebpageObject等。 */ 261 | @property (nonatomic, retain) id mediaObject; 262 | 263 | /*! @brief 设置消息缩略图的方法 264 | * 265 | * @param image 缩略图 266 | * @note 大小不能超过32K 267 | */ 268 | - (void) setThumbImage:(UIImage *)image; 269 | 270 | @end 271 | 272 | 273 | #pragma mark - 274 | /*! @brief 多媒体消息中包含的图片数据对象 275 | * 276 | * 微信终端和第三方程序之间传递消息中包含的图片数据对象。 277 | * @note imageData和imageUrl成员不能同时为空 278 | * @see WXMediaMessage 279 | */ 280 | @interface WXImageObject : NSObject 281 | /*! @brief 返回一个WXImageObject对象 282 | * 283 | * @note 返回的WXImageObject对象是自动释放的 284 | */ 285 | +(WXImageObject *) object; 286 | 287 | /** 图片真实数据内容 288 | * @note 大小不能超过10M 289 | */ 290 | @property (nonatomic, retain) NSData *imageData; 291 | /** 图片url 292 | * @note 长度不能超过10K 293 | */ 294 | @property (nonatomic, retain) NSString *imageUrl; 295 | 296 | @end 297 | 298 | /*! @brief 多媒体消息中包含的音乐数据对象 299 | * 300 | * 微信终端和第三方程序之间传递消息中包含的音乐数据对象。 301 | * @note musicUrl和musicLowBandUrl成员不能同时为空。 302 | * @see WXMediaMessage 303 | */ 304 | @interface WXMusicObject : NSObject 305 | /*! @brief 返回一个WXMusicObject对象 306 | * 307 | * @note 返回的WXMusicObject对象是自动释放的 308 | */ 309 | +(WXMusicObject *) object; 310 | 311 | /** 音乐网页的url地址 312 | * @note 长度不能超过10K 313 | */ 314 | @property (nonatomic, retain) NSString *musicUrl; 315 | /** 音乐lowband网页的url地址 316 | * @note 长度不能超过10K 317 | */ 318 | @property (nonatomic, retain) NSString *musicLowBandUrl; 319 | /** 音乐数据url地址 320 | * @note 长度不能超过10K 321 | */ 322 | @property (nonatomic, retain) NSString *musicDataUrl; 323 | 324 | /**音乐lowband数据url地址 325 | * @note 长度不能超过10K 326 | */ 327 | @property (nonatomic, retain) NSString *musicLowBandDataUrl; 328 | 329 | @end 330 | 331 | /*! @brief 多媒体消息中包含的视频数据对象 332 | * 333 | * 微信终端和第三方程序之间传递消息中包含的视频数据对象。 334 | * @note videoUrl和videoLowBandUrl不能同时为空。 335 | * @see WXMediaMessage 336 | */ 337 | @interface WXVideoObject : NSObject 338 | /*! @brief 返回一个WXVideoObject对象 339 | * 340 | * @note 返回的WXVideoObject对象是自动释放的 341 | */ 342 | +(WXVideoObject *) object; 343 | 344 | /** 视频网页的url地址 345 | * @note 长度不能超过10K 346 | */ 347 | @property (nonatomic, retain) NSString *videoUrl; 348 | /** 视频lowband网页的url地址 349 | * @note 长度不能超过10K 350 | */ 351 | @property (nonatomic, retain) NSString *videoLowBandUrl; 352 | 353 | @end 354 | 355 | /*! @brief 多媒体消息中包含的网页数据对象 356 | * 357 | * 微信终端和第三方程序之间传递消息中包含的网页数据对象。 358 | * @see WXMediaMessage 359 | */ 360 | @interface WXWebpageObject : NSObject 361 | /*! @brief 返回一个WXWebpageObject对象 362 | * 363 | * @note 返回的WXWebpageObject对象是自动释放的 364 | */ 365 | +(WXWebpageObject *) object; 366 | 367 | /** 网页的url地址 368 | * @note 不能为空且长度不能超过10K 369 | */ 370 | @property (nonatomic, retain) NSString *webpageUrl; 371 | 372 | @end 373 | 374 | /*! @brief 多媒体消息中包含的App扩展数据对象 375 | * 376 | * 第三方程序向微信终端发送包含WXAppExtendObject的多媒体消息, 377 | * 微信需要处理该消息时,会调用该第三方程序来处理多媒体消息内容。 378 | * @note url,extInfo和fileData不能同时为空 379 | * @see WXMediaMessage 380 | */ 381 | @interface WXAppExtendObject : NSObject 382 | /*! @brief 返回一个WXAppExtendObject对象 383 | * 384 | * @note 返回的WXAppExtendObject对象是自动释放的 385 | */ 386 | +(WXAppExtendObject *) object; 387 | 388 | /** 若第三方程序不存在,微信终端会打开该url所指的App下载地址 389 | * @note 长度不能超过10K 390 | */ 391 | @property (nonatomic, retain) NSString *url; 392 | /** 第三方程序自定义简单数据,微信终端会回传给第三方程序处理 393 | * @note 长度不能超过2K 394 | */ 395 | @property (nonatomic, retain) NSString *extInfo; 396 | /** App文件数据,该数据发送给微信好友,微信好友需要点击后下载数据,微信终端会回传给第三方程序处理 397 | * @note 大小不能超过10M 398 | */ 399 | @property (nonatomic, retain) NSData *fileData; 400 | 401 | @end 402 | 403 | /*! @brief 多媒体消息中包含的表情数据对象 404 | * 405 | * 微信终端和第三方程序之间传递消息中包含的表情数据对象。 406 | * @see WXMediaMessage 407 | */ 408 | @interface WXEmoticonObject : NSObject 409 | 410 | /*! @brief 返回一个WXEmoticonObject对象 411 | * 412 | * @note 返回的WXEmoticonObject对象是自动释放的 413 | */ 414 | +(WXEmoticonObject *) object; 415 | 416 | /** 表情真实数据内容 417 | * @note 大小不能超过10M 418 | */ 419 | @property (nonatomic, retain) NSData *emoticonData; 420 | 421 | @end 422 | 423 | /*! @brief todo 424 | * 425 | * @see WXMediaMessage 426 | */ 427 | @interface WXFileObject : NSObject 428 | 429 | /*! @brief 返回一个WXFileObject对象 430 | * 431 | * @note 返回的WXFileObject对象是自动释放的 432 | */ 433 | +(WXFileObject *) object; 434 | 435 | /** 文件后缀名 436 | * @note 长度不超过64字节 437 | */ 438 | @property (nonatomic, retain) NSString *fileExtension; 439 | 440 | /** 文件真实数据内容 441 | * @note 大小不能超过10M 442 | */ 443 | @property (nonatomic, retain) NSData *fileData; 444 | 445 | @end 446 | -------------------------------------------------------------------------------- /bubble.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5A1520D21A30076E00CBEB06 /* ResultScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A1520D11A30076E00CBEB06 /* ResultScene.m */; }; 11 | 5A1520D81A303EDF00CBEB06 /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1520D51A303EDF00CBEB06 /* libWeChatSDK.a */; }; 12 | 5A1520DA1A304A1B00CBEB06 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1520D91A304A1B00CBEB06 /* SystemConfiguration.framework */; }; 13 | 5A1520DC1A304A1F00CBEB06 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1520DB1A304A1F00CBEB06 /* libz.dylib */; }; 14 | 5A1520DE1A304A2E00CBEB06 /* libsqlite3.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A1520DD1A304A2E00CBEB06 /* libsqlite3.0.dylib */; }; 15 | 5A1520E21A304EAE00CBEB06 /* PopSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5A1520E11A304EAE00CBEB06 /* PopSound.mp3 */; }; 16 | 5A1520E41A3065A500CBEB06 /* BombSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5A1520E31A3065A500CBEB06 /* BombSound.mp3 */; }; 17 | 5A5FA3B11A26CD5D000E7945 /* BombBubbleNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A5FA3B01A26CD5D000E7945 /* BombBubbleNode.m */; }; 18 | 5A5FA3B41A26CD9B000E7945 /* NormalBubbleNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A5FA3B31A26CD9B000E7945 /* NormalBubbleNode.m */; }; 19 | 5A6F1DC91A28211900E7EAD7 /* GameCenterService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A6F1DC81A28211900E7EAD7 /* GameCenterService.m */; }; 20 | 5A6F1DCB1A28255F00E7EAD7 /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A6F1DCA1A28255F00E7EAD7 /* GameKit.framework */; }; 21 | 5A6F1DCF1A28528700E7EAD7 /* BubblePoolService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A6F1DCE1A28528700E7EAD7 /* BubblePoolService.m */; }; 22 | 5AA4559C1A2F196E00841696 /* GlobalHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AA4559B1A2F196E00841696 /* GlobalHolder.m */; }; 23 | 5AC936E11A2579CC00AF04C6 /* BubbleSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5AC936E01A2579CC00AF04C6 /* BubbleSound.mp3 */; }; 24 | 5AFBD20F1A24300C00D52673 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD20E1A24300C00D52673 /* main.m */; }; 25 | 5AFBD2121A24300C00D52673 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD2111A24300C00D52673 /* AppDelegate.m */; }; 26 | 5AFBD2151A24300C00D52673 /* GameScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD2141A24300C00D52673 /* GameScene.m */; }; 27 | 5AFBD21A1A24300C00D52673 /* GameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD2191A24300C00D52673 /* GameViewController.m */; }; 28 | 5AFBD21D1A24300C00D52673 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5AFBD21B1A24300C00D52673 /* Main.storyboard */; }; 29 | 5AFBD21F1A24300C00D52673 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5AFBD21E1A24300C00D52673 /* Images.xcassets */; }; 30 | 5AFBD2221A24300C00D52673 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5AFBD2201A24300C00D52673 /* LaunchScreen.xib */; }; 31 | 5AFBD22E1A24300C00D52673 /* bubbleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD22D1A24300C00D52673 /* bubbleTests.m */; }; 32 | 5AFBD23D1A24332300D52673 /* MenuScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD23C1A24332300D52673 /* MenuScene.m */; }; 33 | 5AFBD2491A2459D800D52673 /* BubbleNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5AFBD2481A2459D800D52673 /* BubbleNode.m */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 5AFBD2281A24300C00D52673 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 5AFBD2011A24300C00D52673 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 5AFBD2081A24300C00D52673; 42 | remoteInfo = bubble; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 5A1520D01A30076E00CBEB06 /* ResultScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultScene.h; sourceTree = ""; }; 48 | 5A1520D11A30076E00CBEB06 /* ResultScene.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResultScene.m; sourceTree = ""; }; 49 | 5A1520D51A303EDF00CBEB06 /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = ""; }; 50 | 5A1520D61A303EDF00CBEB06 /* WXApi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApi.h; sourceTree = ""; }; 51 | 5A1520D71A303EDF00CBEB06 /* WXApiObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiObject.h; sourceTree = ""; }; 52 | 5A1520D91A304A1B00CBEB06 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 53 | 5A1520DB1A304A1F00CBEB06 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 54 | 5A1520DD1A304A2E00CBEB06 /* libsqlite3.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.0.dylib; path = usr/lib/libsqlite3.0.dylib; sourceTree = SDKROOT; }; 55 | 5A1520E11A304EAE00CBEB06 /* PopSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = PopSound.mp3; path = Resource/PopSound.mp3; sourceTree = ""; }; 56 | 5A1520E31A3065A500CBEB06 /* BombSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = BombSound.mp3; path = Resource/BombSound.mp3; sourceTree = ""; }; 57 | 5A5FA3AF1A26CD5D000E7945 /* BombBubbleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BombBubbleNode.h; sourceTree = ""; }; 58 | 5A5FA3B01A26CD5D000E7945 /* BombBubbleNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BombBubbleNode.m; sourceTree = ""; }; 59 | 5A5FA3B21A26CD9B000E7945 /* NormalBubbleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NormalBubbleNode.h; sourceTree = ""; }; 60 | 5A5FA3B31A26CD9B000E7945 /* NormalBubbleNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NormalBubbleNode.m; sourceTree = ""; }; 61 | 5A6F1DC71A28211900E7EAD7 /* GameCenterService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameCenterService.h; sourceTree = ""; }; 62 | 5A6F1DC81A28211900E7EAD7 /* GameCenterService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameCenterService.m; sourceTree = ""; }; 63 | 5A6F1DCA1A28255F00E7EAD7 /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; }; 64 | 5A6F1DCD1A28528700E7EAD7 /* BubblePoolService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BubblePoolService.h; sourceTree = ""; }; 65 | 5A6F1DCE1A28528700E7EAD7 /* BubblePoolService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BubblePoolService.m; sourceTree = ""; }; 66 | 5AA4559A1A2F196E00841696 /* GlobalHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalHolder.h; sourceTree = ""; }; 67 | 5AA4559B1A2F196E00841696 /* GlobalHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GlobalHolder.m; sourceTree = ""; }; 68 | 5AC936E01A2579CC00AF04C6 /* BubbleSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = BubbleSound.mp3; path = Resource/BubbleSound.mp3; sourceTree = ""; }; 69 | 5AFBD2091A24300C00D52673 /* bubble.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bubble.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 5AFBD20D1A24300C00D52673 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | 5AFBD20E1A24300C00D52673 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 72 | 5AFBD2101A24300C00D52673 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 73 | 5AFBD2111A24300C00D52673 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 74 | 5AFBD2131A24300C00D52673 /* GameScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GameScene.h; sourceTree = ""; }; 75 | 5AFBD2141A24300C00D52673 /* GameScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GameScene.m; sourceTree = ""; }; 76 | 5AFBD2181A24300C00D52673 /* GameViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GameViewController.h; sourceTree = ""; }; 77 | 5AFBD2191A24300C00D52673 /* GameViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GameViewController.m; sourceTree = ""; }; 78 | 5AFBD21C1A24300C00D52673 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 79 | 5AFBD21E1A24300C00D52673 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 80 | 5AFBD2211A24300C00D52673 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 81 | 5AFBD2271A24300C00D52673 /* bubbleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = bubbleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 82 | 5AFBD22C1A24300C00D52673 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 83 | 5AFBD22D1A24300C00D52673 /* bubbleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bubbleTests.m; sourceTree = ""; }; 84 | 5AFBD23B1A24332300D52673 /* MenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuScene.h; sourceTree = ""; }; 85 | 5AFBD23C1A24332300D52673 /* MenuScene.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuScene.m; sourceTree = ""; }; 86 | 5AFBD2471A2459D800D52673 /* BubbleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BubbleNode.h; sourceTree = ""; }; 87 | 5AFBD2481A2459D800D52673 /* BubbleNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BubbleNode.m; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | 5AFBD2061A24300C00D52673 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 5A1520DE1A304A2E00CBEB06 /* libsqlite3.0.dylib in Frameworks */, 96 | 5A1520DC1A304A1F00CBEB06 /* libz.dylib in Frameworks */, 97 | 5A1520DA1A304A1B00CBEB06 /* SystemConfiguration.framework in Frameworks */, 98 | 5A1520D81A303EDF00CBEB06 /* libWeChatSDK.a in Frameworks */, 99 | 5A6F1DCB1A28255F00E7EAD7 /* GameKit.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 5AFBD2241A24300C00D52673 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | /* End PBXFrameworksBuildPhase section */ 111 | 112 | /* Begin PBXGroup section */ 113 | 5A1520D31A303E4700CBEB06 /* Libs */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 5A1520D41A303EDF00CBEB06 /* WXApi */, 117 | ); 118 | name = Libs; 119 | sourceTree = ""; 120 | }; 121 | 5A1520D41A303EDF00CBEB06 /* WXApi */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 5A1520D51A303EDF00CBEB06 /* libWeChatSDK.a */, 125 | 5A1520D61A303EDF00CBEB06 /* WXApi.h */, 126 | 5A1520D71A303EDF00CBEB06 /* WXApiObject.h */, 127 | ); 128 | path = WXApi; 129 | sourceTree = ""; 130 | }; 131 | 5A6F1DC61A28210B00E7EAD7 /* Service */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 5A6F1DC71A28211900E7EAD7 /* GameCenterService.h */, 135 | 5A6F1DC81A28211900E7EAD7 /* GameCenterService.m */, 136 | 5A6F1DCD1A28528700E7EAD7 /* BubblePoolService.h */, 137 | 5A6F1DCE1A28528700E7EAD7 /* BubblePoolService.m */, 138 | 5AA4559A1A2F196E00841696 /* GlobalHolder.h */, 139 | 5AA4559B1A2F196E00841696 /* GlobalHolder.m */, 140 | ); 141 | name = Service; 142 | sourceTree = ""; 143 | }; 144 | 5A6F1DCC1A28264000E7EAD7 /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 5A1520DD1A304A2E00CBEB06 /* libsqlite3.0.dylib */, 148 | 5A1520DB1A304A1F00CBEB06 /* libz.dylib */, 149 | 5A1520D91A304A1B00CBEB06 /* SystemConfiguration.framework */, 150 | 5A6F1DCA1A28255F00E7EAD7 /* GameKit.framework */, 151 | ); 152 | name = Frameworks; 153 | sourceTree = ""; 154 | }; 155 | 5AC936DB1A25780300AF04C6 /* Resource */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 5A1520E31A3065A500CBEB06 /* BombSound.mp3 */, 159 | 5A1520E11A304EAE00CBEB06 /* PopSound.mp3 */, 160 | 5AC936E01A2579CC00AF04C6 /* BubbleSound.mp3 */, 161 | ); 162 | name = Resource; 163 | sourceTree = ""; 164 | }; 165 | 5AFBD2001A24300C00D52673 = { 166 | isa = PBXGroup; 167 | children = ( 168 | 5AFBD20B1A24300C00D52673 /* bubble */, 169 | 5AFBD22A1A24300C00D52673 /* bubbleTests */, 170 | 5AFBD20A1A24300C00D52673 /* Products */, 171 | ); 172 | sourceTree = ""; 173 | }; 174 | 5AFBD20A1A24300C00D52673 /* Products */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 5AFBD2091A24300C00D52673 /* bubble.app */, 178 | 5AFBD2271A24300C00D52673 /* bubbleTests.xctest */, 179 | ); 180 | name = Products; 181 | sourceTree = ""; 182 | }; 183 | 5AFBD20B1A24300C00D52673 /* bubble */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 5A1520D31A303E4700CBEB06 /* Libs */, 187 | 5A6F1DCC1A28264000E7EAD7 /* Frameworks */, 188 | 5A6F1DC61A28210B00E7EAD7 /* Service */, 189 | 5AC936DB1A25780300AF04C6 /* Resource */, 190 | 5AFBD24A1A24888500D52673 /* Controller */, 191 | 5AFBD2461A2459C500D52673 /* Node */, 192 | 5AFBD2371A24301100D52673 /* Scene */, 193 | 5AFBD2101A24300C00D52673 /* AppDelegate.h */, 194 | 5AFBD2111A24300C00D52673 /* AppDelegate.m */, 195 | 5AFBD21B1A24300C00D52673 /* Main.storyboard */, 196 | 5AFBD21E1A24300C00D52673 /* Images.xcassets */, 197 | 5AFBD2201A24300C00D52673 /* LaunchScreen.xib */, 198 | 5AFBD20C1A24300C00D52673 /* Supporting Files */, 199 | ); 200 | path = bubble; 201 | sourceTree = ""; 202 | }; 203 | 5AFBD20C1A24300C00D52673 /* Supporting Files */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 5AFBD20D1A24300C00D52673 /* Info.plist */, 207 | 5AFBD20E1A24300C00D52673 /* main.m */, 208 | ); 209 | name = "Supporting Files"; 210 | sourceTree = ""; 211 | }; 212 | 5AFBD22A1A24300C00D52673 /* bubbleTests */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | 5AFBD22D1A24300C00D52673 /* bubbleTests.m */, 216 | 5AFBD22B1A24300C00D52673 /* Supporting Files */, 217 | ); 218 | path = bubbleTests; 219 | sourceTree = ""; 220 | }; 221 | 5AFBD22B1A24300C00D52673 /* Supporting Files */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 5AFBD22C1A24300C00D52673 /* Info.plist */, 225 | ); 226 | name = "Supporting Files"; 227 | sourceTree = ""; 228 | }; 229 | 5AFBD2371A24301100D52673 /* Scene */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 5AFBD2131A24300C00D52673 /* GameScene.h */, 233 | 5AFBD2141A24300C00D52673 /* GameScene.m */, 234 | 5AFBD23B1A24332300D52673 /* MenuScene.h */, 235 | 5AFBD23C1A24332300D52673 /* MenuScene.m */, 236 | 5A1520D01A30076E00CBEB06 /* ResultScene.h */, 237 | 5A1520D11A30076E00CBEB06 /* ResultScene.m */, 238 | ); 239 | name = Scene; 240 | sourceTree = ""; 241 | }; 242 | 5AFBD2461A2459C500D52673 /* Node */ = { 243 | isa = PBXGroup; 244 | children = ( 245 | 5AFBD2471A2459D800D52673 /* BubbleNode.h */, 246 | 5AFBD2481A2459D800D52673 /* BubbleNode.m */, 247 | 5A5FA3AF1A26CD5D000E7945 /* BombBubbleNode.h */, 248 | 5A5FA3B01A26CD5D000E7945 /* BombBubbleNode.m */, 249 | 5A5FA3B21A26CD9B000E7945 /* NormalBubbleNode.h */, 250 | 5A5FA3B31A26CD9B000E7945 /* NormalBubbleNode.m */, 251 | ); 252 | name = Node; 253 | sourceTree = ""; 254 | }; 255 | 5AFBD24A1A24888500D52673 /* Controller */ = { 256 | isa = PBXGroup; 257 | children = ( 258 | 5AFBD2181A24300C00D52673 /* GameViewController.h */, 259 | 5AFBD2191A24300C00D52673 /* GameViewController.m */, 260 | ); 261 | name = Controller; 262 | sourceTree = ""; 263 | }; 264 | /* End PBXGroup section */ 265 | 266 | /* Begin PBXNativeTarget section */ 267 | 5AFBD2081A24300C00D52673 /* bubble */ = { 268 | isa = PBXNativeTarget; 269 | buildConfigurationList = 5AFBD2311A24300C00D52673 /* Build configuration list for PBXNativeTarget "bubble" */; 270 | buildPhases = ( 271 | 5AFBD2051A24300C00D52673 /* Sources */, 272 | 5AFBD2061A24300C00D52673 /* Frameworks */, 273 | 5AFBD2071A24300C00D52673 /* Resources */, 274 | ); 275 | buildRules = ( 276 | ); 277 | dependencies = ( 278 | ); 279 | name = bubble; 280 | productName = bubble; 281 | productReference = 5AFBD2091A24300C00D52673 /* bubble.app */; 282 | productType = "com.apple.product-type.application"; 283 | }; 284 | 5AFBD2261A24300C00D52673 /* bubbleTests */ = { 285 | isa = PBXNativeTarget; 286 | buildConfigurationList = 5AFBD2341A24300C00D52673 /* Build configuration list for PBXNativeTarget "bubbleTests" */; 287 | buildPhases = ( 288 | 5AFBD2231A24300C00D52673 /* Sources */, 289 | 5AFBD2241A24300C00D52673 /* Frameworks */, 290 | 5AFBD2251A24300C00D52673 /* Resources */, 291 | ); 292 | buildRules = ( 293 | ); 294 | dependencies = ( 295 | 5AFBD2291A24300C00D52673 /* PBXTargetDependency */, 296 | ); 297 | name = bubbleTests; 298 | productName = bubbleTests; 299 | productReference = 5AFBD2271A24300C00D52673 /* bubbleTests.xctest */; 300 | productType = "com.apple.product-type.bundle.unit-test"; 301 | }; 302 | /* End PBXNativeTarget section */ 303 | 304 | /* Begin PBXProject section */ 305 | 5AFBD2011A24300C00D52673 /* Project object */ = { 306 | isa = PBXProject; 307 | attributes = { 308 | LastUpgradeCheck = 0610; 309 | ORGANIZATIONNAME = zangzhiya; 310 | TargetAttributes = { 311 | 5AFBD2081A24300C00D52673 = { 312 | CreatedOnToolsVersion = 6.1; 313 | DevelopmentTeam = LMJACF6T63; 314 | SystemCapabilities = { 315 | com.apple.GameCenter = { 316 | enabled = 1; 317 | }; 318 | }; 319 | }; 320 | 5AFBD2261A24300C00D52673 = { 321 | CreatedOnToolsVersion = 6.1; 322 | TestTargetID = 5AFBD2081A24300C00D52673; 323 | }; 324 | }; 325 | }; 326 | buildConfigurationList = 5AFBD2041A24300C00D52673 /* Build configuration list for PBXProject "bubble" */; 327 | compatibilityVersion = "Xcode 3.2"; 328 | developmentRegion = English; 329 | hasScannedForEncodings = 0; 330 | knownRegions = ( 331 | en, 332 | Base, 333 | ); 334 | mainGroup = 5AFBD2001A24300C00D52673; 335 | productRefGroup = 5AFBD20A1A24300C00D52673 /* Products */; 336 | projectDirPath = ""; 337 | projectRoot = ""; 338 | targets = ( 339 | 5AFBD2081A24300C00D52673 /* bubble */, 340 | 5AFBD2261A24300C00D52673 /* bubbleTests */, 341 | ); 342 | }; 343 | /* End PBXProject section */ 344 | 345 | /* Begin PBXResourcesBuildPhase section */ 346 | 5AFBD2071A24300C00D52673 /* Resources */ = { 347 | isa = PBXResourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | 5A1520E21A304EAE00CBEB06 /* PopSound.mp3 in Resources */, 351 | 5AFBD2221A24300C00D52673 /* LaunchScreen.xib in Resources */, 352 | 5AFBD21F1A24300C00D52673 /* Images.xcassets in Resources */, 353 | 5AFBD21D1A24300C00D52673 /* Main.storyboard in Resources */, 354 | 5A1520E41A3065A500CBEB06 /* BombSound.mp3 in Resources */, 355 | 5AC936E11A2579CC00AF04C6 /* BubbleSound.mp3 in Resources */, 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | 5AFBD2251A24300C00D52673 /* Resources */ = { 360 | isa = PBXResourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | /* End PBXResourcesBuildPhase section */ 367 | 368 | /* Begin PBXSourcesBuildPhase section */ 369 | 5AFBD2051A24300C00D52673 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 5A5FA3B41A26CD9B000E7945 /* NormalBubbleNode.m in Sources */, 374 | 5AFBD21A1A24300C00D52673 /* GameViewController.m in Sources */, 375 | 5A6F1DC91A28211900E7EAD7 /* GameCenterService.m in Sources */, 376 | 5AFBD23D1A24332300D52673 /* MenuScene.m in Sources */, 377 | 5AFBD2121A24300C00D52673 /* AppDelegate.m in Sources */, 378 | 5A5FA3B11A26CD5D000E7945 /* BombBubbleNode.m in Sources */, 379 | 5AFBD2491A2459D800D52673 /* BubbleNode.m in Sources */, 380 | 5AA4559C1A2F196E00841696 /* GlobalHolder.m in Sources */, 381 | 5AFBD2151A24300C00D52673 /* GameScene.m in Sources */, 382 | 5A1520D21A30076E00CBEB06 /* ResultScene.m in Sources */, 383 | 5AFBD20F1A24300C00D52673 /* main.m in Sources */, 384 | 5A6F1DCF1A28528700E7EAD7 /* BubblePoolService.m in Sources */, 385 | ); 386 | runOnlyForDeploymentPostprocessing = 0; 387 | }; 388 | 5AFBD2231A24300C00D52673 /* Sources */ = { 389 | isa = PBXSourcesBuildPhase; 390 | buildActionMask = 2147483647; 391 | files = ( 392 | 5AFBD22E1A24300C00D52673 /* bubbleTests.m in Sources */, 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | }; 396 | /* End PBXSourcesBuildPhase section */ 397 | 398 | /* Begin PBXTargetDependency section */ 399 | 5AFBD2291A24300C00D52673 /* PBXTargetDependency */ = { 400 | isa = PBXTargetDependency; 401 | target = 5AFBD2081A24300C00D52673 /* bubble */; 402 | targetProxy = 5AFBD2281A24300C00D52673 /* PBXContainerItemProxy */; 403 | }; 404 | /* End PBXTargetDependency section */ 405 | 406 | /* Begin PBXVariantGroup section */ 407 | 5AFBD21B1A24300C00D52673 /* Main.storyboard */ = { 408 | isa = PBXVariantGroup; 409 | children = ( 410 | 5AFBD21C1A24300C00D52673 /* Base */, 411 | ); 412 | name = Main.storyboard; 413 | sourceTree = ""; 414 | }; 415 | 5AFBD2201A24300C00D52673 /* LaunchScreen.xib */ = { 416 | isa = PBXVariantGroup; 417 | children = ( 418 | 5AFBD2211A24300C00D52673 /* Base */, 419 | ); 420 | name = LaunchScreen.xib; 421 | sourceTree = ""; 422 | }; 423 | /* End PBXVariantGroup section */ 424 | 425 | /* Begin XCBuildConfiguration section */ 426 | 5AFBD22F1A24300C00D52673 /* Debug */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ALWAYS_SEARCH_USER_PATHS = NO; 430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 431 | CLANG_CXX_LIBRARY = "libc++"; 432 | CLANG_ENABLE_MODULES = YES; 433 | CLANG_ENABLE_OBJC_ARC = YES; 434 | CLANG_WARN_BOOL_CONVERSION = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 437 | CLANG_WARN_EMPTY_BODY = YES; 438 | CLANG_WARN_ENUM_CONVERSION = YES; 439 | CLANG_WARN_INT_CONVERSION = YES; 440 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 441 | CLANG_WARN_UNREACHABLE_CODE = YES; 442 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 443 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 444 | COPY_PHASE_STRIP = NO; 445 | ENABLE_STRICT_OBJC_MSGSEND = YES; 446 | GCC_C_LANGUAGE_STANDARD = gnu99; 447 | GCC_DYNAMIC_NO_PIC = NO; 448 | GCC_OPTIMIZATION_LEVEL = 0; 449 | GCC_PREPROCESSOR_DEFINITIONS = ( 450 | "DEBUG=1", 451 | "$(inherited)", 452 | ); 453 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 461 | MTL_ENABLE_DEBUG_INFO = YES; 462 | ONLY_ACTIVE_ARCH = YES; 463 | SDKROOT = iphoneos; 464 | }; 465 | name = Debug; 466 | }; 467 | 5AFBD2301A24300C00D52673 /* Release */ = { 468 | isa = XCBuildConfiguration; 469 | buildSettings = { 470 | ALWAYS_SEARCH_USER_PATHS = NO; 471 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 472 | CLANG_CXX_LIBRARY = "libc++"; 473 | CLANG_ENABLE_MODULES = YES; 474 | CLANG_ENABLE_OBJC_ARC = YES; 475 | CLANG_WARN_BOOL_CONVERSION = YES; 476 | CLANG_WARN_CONSTANT_CONVERSION = YES; 477 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 478 | CLANG_WARN_EMPTY_BODY = YES; 479 | CLANG_WARN_ENUM_CONVERSION = YES; 480 | CLANG_WARN_INT_CONVERSION = YES; 481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 482 | CLANG_WARN_UNREACHABLE_CODE = YES; 483 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 484 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 485 | COPY_PHASE_STRIP = YES; 486 | ENABLE_NS_ASSERTIONS = NO; 487 | ENABLE_STRICT_OBJC_MSGSEND = YES; 488 | GCC_C_LANGUAGE_STANDARD = gnu99; 489 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 490 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 491 | GCC_WARN_UNDECLARED_SELECTOR = YES; 492 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 493 | GCC_WARN_UNUSED_FUNCTION = YES; 494 | GCC_WARN_UNUSED_VARIABLE = YES; 495 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 496 | MTL_ENABLE_DEBUG_INFO = NO; 497 | SDKROOT = iphoneos; 498 | VALIDATE_PRODUCT = YES; 499 | }; 500 | name = Release; 501 | }; 502 | 5AFBD2321A24300C00D52673 /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | buildSettings = { 505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 506 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 507 | CODE_SIGN_IDENTITY = "iPhone Developer"; 508 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 509 | ENABLE_BITCODE = NO; 510 | INFOPLIST_FILE = bubble/Info.plist; 511 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 513 | LIBRARY_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "$(PROJECT_DIR)/bubble/WXApi", 516 | ); 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | PROVISIONING_PROFILE = ""; 519 | }; 520 | name = Debug; 521 | }; 522 | 5AFBD2331A24300C00D52673 /* Release */ = { 523 | isa = XCBuildConfiguration; 524 | buildSettings = { 525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 526 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 527 | CODE_SIGN_IDENTITY = "iPhone Developer"; 528 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 529 | ENABLE_BITCODE = NO; 530 | INFOPLIST_FILE = bubble/Info.plist; 531 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 533 | LIBRARY_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "$(PROJECT_DIR)/bubble/WXApi", 536 | ); 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | PROVISIONING_PROFILE = ""; 539 | }; 540 | name = Release; 541 | }; 542 | 5AFBD2351A24300C00D52673 /* Debug */ = { 543 | isa = XCBuildConfiguration; 544 | buildSettings = { 545 | BUNDLE_LOADER = "$(TEST_HOST)"; 546 | FRAMEWORK_SEARCH_PATHS = ( 547 | "$(SDKROOT)/Developer/Library/Frameworks", 548 | "$(inherited)", 549 | ); 550 | GCC_PREPROCESSOR_DEFINITIONS = ( 551 | "DEBUG=1", 552 | "$(inherited)", 553 | ); 554 | INFOPLIST_FILE = bubbleTests/Info.plist; 555 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bubble.app/bubble"; 558 | }; 559 | name = Debug; 560 | }; 561 | 5AFBD2361A24300C00D52673 /* Release */ = { 562 | isa = XCBuildConfiguration; 563 | buildSettings = { 564 | BUNDLE_LOADER = "$(TEST_HOST)"; 565 | FRAMEWORK_SEARCH_PATHS = ( 566 | "$(SDKROOT)/Developer/Library/Frameworks", 567 | "$(inherited)", 568 | ); 569 | INFOPLIST_FILE = bubbleTests/Info.plist; 570 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 571 | PRODUCT_NAME = "$(TARGET_NAME)"; 572 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bubble.app/bubble"; 573 | }; 574 | name = Release; 575 | }; 576 | /* End XCBuildConfiguration section */ 577 | 578 | /* Begin XCConfigurationList section */ 579 | 5AFBD2041A24300C00D52673 /* Build configuration list for PBXProject "bubble" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | 5AFBD22F1A24300C00D52673 /* Debug */, 583 | 5AFBD2301A24300C00D52673 /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | 5AFBD2311A24300C00D52673 /* Build configuration list for PBXNativeTarget "bubble" */ = { 589 | isa = XCConfigurationList; 590 | buildConfigurations = ( 591 | 5AFBD2321A24300C00D52673 /* Debug */, 592 | 5AFBD2331A24300C00D52673 /* Release */, 593 | ); 594 | defaultConfigurationIsVisible = 0; 595 | defaultConfigurationName = Release; 596 | }; 597 | 5AFBD2341A24300C00D52673 /* Build configuration list for PBXNativeTarget "bubbleTests" */ = { 598 | isa = XCConfigurationList; 599 | buildConfigurations = ( 600 | 5AFBD2351A24300C00D52673 /* Debug */, 601 | 5AFBD2361A24300C00D52673 /* Release */, 602 | ); 603 | defaultConfigurationIsVisible = 0; 604 | defaultConfigurationName = Release; 605 | }; 606 | /* End XCConfigurationList section */ 607 | }; 608 | rootObject = 5AFBD2011A24300C00D52673 /* Project object */; 609 | } 610 | --------------------------------------------------------------------------------