Skip to content

Instantly share code, notes, and snippets.

@phi-jp
Last active December 11, 2015 18:08
Show Gist options
  • Save phi-jp/4639256 to your computer and use it in GitHub Desktop.
Save phi-jp/4639256 to your computer and use it in GitHub Desktop.
GGJ in 新宿 with tmlib.js

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

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

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

// 9leap に投稿したときだけ反応します
tm.social.Nineleap.postRanking(スコア, メッセージ);

例) Diving Girl の場合は下記のような感じで追加すればok!

/*
 *リザルト画面
 */
var ResultScene = tm.createClass({
    superClass: tm.app.ResultScene,
    
    init: function() {
        this.superInit({
            //score: ((app.frame/app.fps)|0)+"M",
            score: app.frame +"cm",
            msg: " ",
            width: SCREEN_WIDTH,
            height: SCREEN_HEIGHT,
            backgroundImage:"back"
        });
        
        // 9leap に投稿したときだけ反応します
        tm.social.Nineleap.postRanking(app.frame, app.frame + "cm 潜りました!!");
    },
    
    onnextscene: function() {
        //this.animation.fadeOut();
        //this.onanimationend = function(){
            app.replaceScene(TitleScene());
        //};
    }
});

2. Properties のタグに 9leap を追加する

screenshot

3. Finish Editing

screenshot

4. 9leap ボタンをクリック

画面下部に 9leap ボタンが出現します. 押して下さい.

screenshot

5. 必要項目に入力

タイトルや概要などを入力.

screenshot

6. 投稿するボタンをクリック

投稿するボタンをクリック

screenshot

以上で完了! わからないことがあったお気軽に@phi_jpまでご連絡を.

テーマに対して

  • 鼓動
  • 心臓
  • ビート
  • ハート
  • 拡縮
  • ライフ
  • ポンプ
  • 空気
  • 足音
  • ドラム音
  • テンポ
  • 緊張
  • 恋愛
  • ドキドキ
  • どきどき
  • 波形・動力
  • 動力

tmlib.js サンプル

tmlib.js 怒濤

Base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment