-
Notifications
You must be signed in to change notification settings - Fork 0
Variable
katsumasa edited this page Apr 21, 2021
·
2 revisions
イベントスクリプト内では変数を利用することが出来ます。
| 型 | 概要 |
|---|---|
| int | 整数型 |
| float | 実数型 |
| string | 文字列型 |
int a
float b
string c
宣言時に値を代入する場合、変数名の後にスペースを入れて値を記述します。
int a 100
float b 12.34
string c "Hello"
イベントスクリプト中に、変数には値もしくは値を代入することが出来ます。 文字列はダブルクォーテーションで括り付けて使用してください。
set a 1234
set b 5.678
set c "World"
int d 5678
float e 9.0
string f "Boo"
set a d
set b d
set c f
いくつかの変数はSystem側でプリセット済みです。 これらの変数はイベント関数実行時の引数で使用することを想定しています。
| 変数名 | プリセット値 |
|---|---|
| fingerId | -4 |
| 変数名 | プリセット値 |
|---|---|
| begin | "begin" |
| move | "move" |
| ended | "ended" |
| down | "down" |
| up | "up" |
| jump | "jump" |
| fire1 | "Fire1" |
| fire2 | "Fire2" |
| fire3 | "Fire3" |
| submit | StandaloneInputModuleOverrideで設定されているsubmitButtonの値 |
| cancel | StandaloneInputModuleOverrideで設定されているcancelButtonの値 |
| horizontal | StandaloneInputModuleOverrideで設定されているhorizontalAxisの値 |
| vertical | StandaloneInputModuleOverrideで設定されているverticalAxisの値 |
| frame | "frame" |
| sec | "sec" |
| sceneChanged | "sceneChanged" |