-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from hackforplay/add-variable-assets
feat: へんすう関係のアセット追加
- Loading branch information
Showing
7 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
const sco = require('../../preference/scopes') | ||
const cat = require('../../preference/categories') | ||
|
||
const base = { | ||
scopes: [ | ||
// sco.ゲームがはじまったとき, | ||
sco.たおされたとき, | ||
sco.しょうかんされたとき, | ||
sco.つくられたとき, | ||
sco.ぶつかったとき, | ||
sco.こうげきされたとき, | ||
sco.つねに, | ||
sco.ふまれたとき, | ||
sco.どかれたとき, | ||
sco.メッセージされたとき, | ||
sco.へんすうがかわったとき, | ||
sco.すすめなかったとき, | ||
sco.マップがかわったとき, | ||
sco.みつけたとき, | ||
sco.タップされたとき | ||
], | ||
module: null, // 改造ボタン用のコードへのパス. null の場合は改造不可 | ||
category: cat.システム, // カテゴリーの参照を指定する | ||
production: false, // www.hackforplay.xyz に表示する場合は true. earlybird だけなら false | ||
plan: 'free' // 'free' にする | ||
} | ||
|
||
const scopeDeclare = [sco.ゲームがはじまったとき] | ||
|
||
const scopeUp = [ | ||
sco.たおされたとき, | ||
sco.しょうかんされたとき, | ||
sco.つくられたとき, | ||
sco.ぶつかったとき, | ||
sco.こうげきされたとき, | ||
sco.つねに, | ||
sco.ふまれたとき, | ||
sco.どかれたとき, | ||
sco.メッセージされたとき, | ||
sco.へんすうがかわったとき, | ||
sco.すすめなかったとき, | ||
sco.マップがかわったとき, | ||
sco.みつけたとき, | ||
sco.タップされたとき | ||
] | ||
|
||
module.exports = [ | ||
{ | ||
...base, | ||
name: 'へんすうをせってい', | ||
description: 'へんすう「スコア」を0にする', | ||
scopes: scopeDeclare, | ||
icon: './variable_declare.png', // アセットのアイコンへのパス | ||
insert: './variable_declare.js' // 追加ボタン用のコードへのパス. null の場合は追加不可 | ||
}, | ||
{ | ||
...base, | ||
name: 'へんすうを1ふやす', | ||
description: 'へんすう「スコア」に+1する', | ||
scopes: scopeUp, | ||
icon: './variable_up.png', // アセットのアイコンへのパス | ||
insert: './variable_up.js' // 追加ボタン用のコードへのパス. null の場合は追加不可 | ||
}, | ||
{ | ||
...base, | ||
name: 'へんすうでゲームクリア', | ||
description: 'へんすう「スコア」が10のとき、ゲームクリア', | ||
scopes: scopeUp, | ||
icon: './variable_gameclear.png', // アセットのアイコンへのパス | ||
insert: './variable_gameclear.js' // 追加ボタン用のコードへのパス. null の場合は追加不可 | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
へんすう['スコア'] = 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if (へんすう['スコア'] === 10) { | ||
ハック.ゲームクリア() | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
へんすう['スコア'] += 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.