// Use this for initialization void Start() { //パーティクル hitParticle = Resources.Load("yResources/HitParticle") as GameObject; blowParticle2 = Resources.Load("yResources/BlowParticle") as GameObject; //親オブジェクト parent = transform.root.gameObject; //子オブジェクト hpGage = parent.transform.Find("EnemyHPgage/HPbar").GetComponent <yHpgage>(); //オブジェクトの参照 combo = GameObject.Find("Combo").GetComponent <yCombo>(); _oBase = GameObject.Find("Reference").GetComponent <oBase>(); _tWeakPointParent = GetComponent <tWeakPointParent>(); //親オブジェクトのあたり判定 box2D = parent.GetComponent <BoxCollider2D>(); //親オブジェクトの頭文字4文字(Enemyかbossか) enemyName = parent.name.Substring(0, 4); print(enemyName); pos = parent.transform.position; }
// Use this for initialization void Start() { obj = GameObject.Find("Reference"); //oBaseの入っているオブジェクトを探す mother = obj.GetComponent <oBase>(); enemy9 = GameObject.Find("Enemy9"); //oBossBaseの入っているオブジェクトを探す enemy9Move = enemy9.GetComponent <oEnemyMove92>(); boss = obj.GetComponent <oBossBase>(); hpgage = enemy9.transform.Find("EnemyHPgage/HPbar").GetComponent <yHpgage>(); }
void Awake() { try { yhp = GameObject.Find("Canvas/HPvar").GetComponent <yHpgage>(); yhp.PlayerHps = PlayerMaxHP; yhp.Acquisition(); }catch (Exception e) { print(e.Message + ": HPゲージ"); } }
// Use this for initialization void Start() { // 子オブジェクトの取得 _child = transform.FindChild("humer").gameObject; if (pChildren == null) { pChildren = GameObject.Find("player"); } pChildColor = pChildren.GetComponent <SpriteRenderer>().color; jsr = new hJoyStickReceiver(); kcs = new hKeyConfigSettings(); kcs.Init(); if (yhp == null) { yhp = new yHpgage(); } //yhp.Acquisition(); }
//private void Start() { _yHpgage = transform.parent.transform.FindChild("EnemyHPgage").transform.FindChild("HPbar").GetComponent <yHpgage>(); }