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
#define Pos( obj, ancher, point ) obj->setAnchorPoint(ancher); obj->setPosition(point) |
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
#define CCAncherLT ( CCPointMake(0.f, 1.f) ) | |
#define CCAncherCT ( CCPointMake(0.5f, 1.f) ) | |
#define CCAncherRT ( CCPOne ) | |
#define CCAncherLC ( CCPointMake(0.f, 0.5f) ) | |
#define CCAncherCC ( CCPHalf ) | |
#define CCAncherRC ( CCPointMake(1.f, 0.5f) ) | |
#define CCAncherLB ( CCPZero ) | |
#define CCAncherCB ( CCPointMake(0.5f, 0.f) ) |
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
#define AtIndex( array, index, type ) ( dynamic_cast<type> (array->objectAtIndex(index)) ) | |
#define ForKey( dic, key, type ) ( dynamic_cast<type> (dic->objectForKey(key)) ) |
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
#define GetLayer(scene, type) ( AtIndex(scene->getChildren(), 0, type) ) |
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
#define GetSecond() ( gettimeofday_sec() ) | |
inline double gettimeofday_sec() | |
{ | |
struct timeval tv; | |
gettimeofday(&tv, NULL); | |
return tv.tv_sec + tv.tv_usec * 1e-6; | |
} |
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
# セットアップ処理をしています。 | |
sub BUILD { | |
my $self = shift; | |
$self->setup_dispatcher(); | |
$self->setup_view(); | |
$self->setup_context(); | |
} | |
# PSGIの仕様にそって、関数の参照を返却しています。 | |
sub to_app { |
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
sub dispatch { | |
my $c = shift; | |
# ユーザが指定された処理を、Mouse::Roleにて差し込めるためのHook. | |
$c->INITIALIZE; | |
# 実行するロジック関数を見つける | |
my ($controller,$action) = $c->dispatcher->match( $c ); | |
# 見つからなければ、404 | |
if ( !$controller or !$action ) { |
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
// ベンダープレフィックス設定 | |
$experimental-support-for-microsoft: false; | |
$experimental-support-for-webkit: true; | |
$experimental-support-for-mozilla: true; | |
$experimental-support-for-opera: false; | |
// compassでこんな感じに書くと | |
@include border-radius(5px); | |
// このように上記で設定した通りにCSSが出力されます |
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名だと状況を特定しすぎているため、汎用的でなく他の場所で使いづらい --> | |
<button class="startBtn">ボタンだよ!</button> | |
<!-- baseBtnで共通スタイルをあてて、長さ、重要等のclassをモジュール的に付け足していく --> | |
<button class="baseBtn">ボタンだよ!</button> | |
<button class="baseBtn long primary">ボタンだよ!</button> |
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
sudo yum install supervisor |
OlderNewer