Last active
January 29, 2019 12:56
-
-
Save todorok1/339c6d14714d4af03ea054c1b1af8532 to your computer and use it in GitHub Desktop.
ScriptableObjectのテスト用に使うキャラクターのコントローラ
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class ScriptableCharaController : MonoBehaviour { | |
| public EnemyData enemyData; | |
| void Start(){ | |
| ShowScriptableObjectData(); | |
| } | |
| void Update(){ | |
| } | |
| void ShowScriptableObjectData(){ | |
| // 参照しているEnemyDataの中身をコンソールに表示する | |
| Debug.Log("私の名前は" + enemyData.enemyName + | |
| ", 最大HPは" + enemyData.maxHp + | |
| ", 攻撃力は" + enemyData.atk + | |
| ", 防御力は" + enemyData.def + | |
| ", 経験値は" + enemyData.exp + | |
| ", ゴールドは" + enemyData.gold + "です。"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment