This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ShootBalloon-Swift.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...前略 | |
// AdMob | |
@import GoogleMobileAds; | |
// google analytics | |
#import "GAI.h" | |
#import "GAIDictionaryBuilder.h" | |
#import "GAIFields.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...前略 | |
// AdMob | |
@import GoogleMobileAds; | |
// google analytics | |
#import "GAI.h" | |
#import "GAIDictionaryBuilder.h" | |
#import "GAIFields.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
// Bクラスを弱参照で保持する。 | |
weak var b:B? | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CCScene*) startScene | |
{ | |
return [CCBReader loadAsScene:@"MainScene"]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GameScene: CCNode { | |
// この変数にSpriteBuilderで作成したコンポーネントが差し込まれる。 | |
weak var _testLabel:CCLabelTTF! | |
// 画面が生成後に同期で呼び出される。 | |
func didLoadFromCCB() { | |
_testLabel.string = "置きかわる!" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GameScene: CCNode { | |
// 物理ノード | |
weak var _physicsNode:CCPhysicsNode! | |
// フレーム毎に呼び出されるメソッド | |
override func update(delta: CCTime) { | |
// ランダムに気球を生成します。 | |
if arc4random_uniform(100) == 0 { | |
// バルーンを生成します。 | |
let balloonNode = CCBReader.load("Parts/BalloonNode") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 気球表示ノード | |
class BalloonNode: CCNode { | |
// 気球本体のSprite | |
weak var _balloonSprite:CCSprite! | |
// 気球生成処理 | |
func didLoadFromCCB() { | |
// 大きさをランダムにします。 | |
self.scale = Float(arc4random_uniform(25) + 25) * 0.01 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Meta.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NameSpace { | |
class Hoge { | |
func test() { | |
print("foo") | |
} | |
} | |
} |
OlderNewer