oEnemyMove10 parent; //※必須 // Use this for initialization void Start() { obj = GameObject.Find("Reference"); mother = obj.GetComponent <oBase>(); boss2 = GameObject.Find("boss2"); parent = boss2.GetComponent <oEnemyMove10>(); }
// Use this for initialization void Start() { pos = transform.position; Destroy(gameObject, f);//f秒後に消す reference = GameObject.Find("Reference"); mother = reference.GetComponent <oBase>(); boss = GameObject.Find("boss2"); boss2 = boss.GetComponent <oEnemyMove10>(); }