Hokkaido.pm Casual#27に行ってきました
みなさん、お疲れ様でした!
いやー、暑いですね。。。
という訳で、メモ。
1. Mojo::UserAgent
独自のユーザエージェントを使う場合は、
Mojo::UserAgentを継承する
2. Knockout.js
便利っぽい!
3. Text::Mecab
なんとかジェネレーター作るのに使う
4. iCal形式
Data::ICalを使う
Googleカレンダーに登録できる!
5. git-助けて
“git-あれして”がすごい!
あと、今回使ったスライドはこちら。
ゲームを作るよ!
おまけのコード
#import "XYZMyScene.h"
@implementation XYZMyScene
-(id)initWithSize:(CGSize)size {
if (self = [super initWithSize:size]) {
/* Setup your scene here */
self.backgroundColor = [SKColor colorWithRed:0.15 green:0.15 blue:0.3 alpha:1.0];
/* ここにコピペ */
const int n = 7;
const CGFloat xyw[][3] = {
{ 0.0, 0.0, 63.0 },
{ 32.0, 8.0, 7.0 },
{ 16.0, 16.0, 15.0 },
{ 0.0, 24.0, 15.0 },
{ 24.0, 32.0, 7.0 },
{ 32.0, 40.0, 7.0 },
{ 40.0, 48.0, 15.0 }
};
/* ここまでコピペ */
double ratio = self.frame.size.width / 64.0;
for (int i=0; i<n; i++) {
CGFloat x = xyw[i][0] * ratio;
CGFloat y = xyw[i][1] * ratio;
CGFloat w = (xyw[i][2] + 1.0) * ratio;
[self addChild:[self createBlockWithPoint:CGPointMake(x, y) widthWidth:w]];
}
self.physicsBody = [SKPhysicsBody bodyWithEdgeLoopFromRect:self.frame];
}
return self;
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
/* Called when a touch begins */
}
-(void)update:(CFTimeInterval)currentTime {
/* Called before each frame is rendered */
}
-(SKSpriteNode *)createBlockWithPoint:(CGPoint)pt widthWidth:(CGFloat)w {
const CGFloat h = 2.f;
SKSpriteNode *node = [SKSpriteNode spriteNodeWithColor:[UIColor whiteColor] size:CGSizeMake(w, h)];
node.physicsBody = [SKPhysicsBody bodyWithEdgeLoopFromRect:CGRectMake(pt.x, pt.y, w, h)];
node.position = CGPointMake(pt.x + (w/2.0), pt.y);
return node;
}
@end
次回は、第4水曜日の8/27を予定しています。
詳細は、こちらをどうぞ。
https://github.com/hokkaidopm/hokkaidopm-casual/issues/12(GitHub)
おしまい。
Leave a Comment