Skip to content

Instantly share code, notes, and snippets.

View phi-jp's full-sized avatar

phi phi-jp

View GitHub Profile
@phi-jp
phi-jp / test.md
Created April 27, 2012 08:55
title

test

@phi-jp
phi-jp / 9leap.md
Last active December 11, 2015 18:08
GGJ in 新宿 with tmlib.js

jsdo.it から 9leap に投稿する方法

1. 9leap にスコアを登録する処理を追加する

ResultScene の init 処理内で下記の関数を実行します. 引数はスコア(数値), メッセージ(文字列)です.

// 9leap に投稿したときだけ反応します
tm.social.Nineleap.postRanking(スコア, メッセージ);
@phi-jp
phi-jp / script.js
Created February 27, 2013 02:11
tmlib.js クラス定義サンプル
tm.define("SubSubHoge", {
superClass: "foo.SubHoge",
init: function(a, b, c) {
this.superInit(a, b);
this.c = c;
}
});
tm.define("foo.SubHoge", {
@phi-jp
phi-jp / watcher.tm.js
Created March 1, 2013 11:44
watcher.tm.js
/*
* phi
*/
;(function(global) {
global.tm = global.tm || {};
var ajax = function(url, fn) {
@phi-jp
phi-jp / ひよこダッシュ.md
Last active December 17, 2015 17:59
tmlib.js チュートリアル用ゲーム

ひよこダッシュ

ジャンル

避けゲー

対象年齢

小学校1, 2年

@phi-jp
phi-jp / index.md
Last active December 19, 2015 07:09
xcode

人気コンボ

コンボ 効果
shift + cmd + o クイックサーチ結果ファイルを分割ビューで表示する。
option + return クイックサーチ結果ファイルを分割ビューで表示する。

社内人気ショートカット一覧

縦向きにする

RootViewController.mm

// Override to allow orientations other than the default portrait orientation.
// This method is deprecated on ios6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@phi-jp
phi-jp / file0.js
Created October 21, 2013 06:12
[tmlib.js] AssetManager で json 読み込み & type 指定 ref: http://qiita.com/phi/items/3c816dce3c1fad518d93
tm.asset.AssetManager.load({
// 普通に読み込む
"image_data": "./kenkyo.jpg",
// type を省略しているので tmss として読み込まれる
"tmss_data": "./crash.tmss",
// tmss だけど type で json を指定しているので json で読み尾込まれる
"json_data00": { url: "./crash.tmss", type: "json" },
// url にオブジェクトを渡しているけど type が json なので File としてかえってくる
"json_data01": { url: {hoge:100, foo:200}, type: "json" },
});
@phi-jp
phi-jp / file0.js
Created October 22, 2013 17:34
[tmlib.js] Keyboard クラスでサクッとプレイヤーを移動させてみよう ref: http://qiita.com/phi/items/7cc359c93c64bfe2a5f0
/*
* tmlib.js 0.2.0
*/
/*
* contant
*/
var SCREEN_WIDTH = 465; // スクリーン幅
var SCREEN_HEIGHT = 465; // スクリーン高さ
var SCREEN_CENTER_X = SCREEN_WIDTH/2; // スクリーン幅の半分
@phi-jp
phi-jp / file0.js
Created October 23, 2013 07:35
[tmlib.js] tmlib.js におけるクラス定義 ref: http://qiita.com/phi/items/04c4fae5a9a86dc4afc5
tm.define(クラス名, {
superClass: 継承元となるクラス名(省略可)
// 初期化処理
init: function() {
superInit(); // 継承もとの初期化
// TODO: 処理を書いていく
}