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
## | |
# グローバル変数を定義 | |
# | |
global = this | |
$ -> | |
#----------------------------------------------------------------------------- | |
# ツールチップ表示処理 | |
# タグ位置からツールチップまでのオフセットは16とします。 |
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
// ツールチップを表示するJavaScript(CoffeeScriptを展開したものです。) | |
(function() { | |
var global; | |
global = this; | |
$(function() { | |
$(document).on('mouseover', '[tooltip]', function() { | |
var div, parent, x, y; | |
if (!global.tooltip) { | |
global.tooltip = document.createElement('div'); |
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
# 使用例 | |
def hoge | |
# キャッシュしたい処理 | |
end | |
instance_cache :hoge | |
def hoge | |
# 何かの処理 | |
cache_data = instance_cache { | |
# キャッシュしたい処理 |
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") |
OlderNewer