Created
July 16, 2018 10:08
-
-
Save todorok1/905748410eb8048eb74666d1f1ab52f5 to your computer and use it in GitHub Desktop.
ToolTipを使ってフィールドの使い方を表示してみよう。
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
public class ToolTipCheck : MonoBehaviour { | |
[Tooltip("これはキャラクターの最大HPです。")] | |
public int maxHp = 255; | |
[Tooltip("こっちはキャラクターの現在のHP。\n最大HPを超えることがあったら報告ください。")] | |
public int hp = 255; | |
const int statusMax = 255; | |
[Tooltip("これはキャラクターの攻撃力です。最大値の255を超えないことを確認してください。")][Range(1, statusMax)] | |
public int atk = 168; | |
[Tooltip("キャラクターの防御力でち。")][Range(1, statusMax)] | |
public int def = 58; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment