「H.Pなどの情報表示」の編集履歴(バックアップ)一覧はこちら
「H.Pなどの情報表示」(2015/05/26 (火) 19:03:47) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
hpというobjectをキャラの子供に配置しておく
3Dtextも子どもとして配置しておく
private void HPboard()
{
GameObject childObject = gameObject.transform.FindChild("hp").gameObject;
childObject.transform.localScale = new Vector3( (float)hp/hpMax, 0.1f, 0.01f);
childObject = gameObject.transform.FindChild("exp").gameObject;
string temp = "#" + no + " "+status+"\nhp"+hp+" exp" + exp;
if (eval >= 3f)
temp += " 脅威";
childObject.GetComponent<TextMesh> ().text = temp;
}
hpというobjectをキャラの子供に配置しておく
3Dtextも子どもとして配置しておく
private void HPboard()
{
GameObject childObject = gameObject.transform.FindChild("hp").gameObject;
childObject.transform.localScale = new Vector3( (float)hp/hpMax, 0.1f, 0.01f);
childObject = gameObject.transform.FindChild("exp").gameObject;
string temp = "#" + no + " "+status+"\nhp"+hp+" exp" + exp;
if (eval >= 3f)
temp += " 脅威";
childObject.GetComponent<TextMesh> ().text = temp;
}