// Update is called once per frame void Update() { // フレームごとに等速で下降させる transform.Translate(0, Data.Instance.BESSlevel, 0); // 画面外に出たらあんこうに戻る if (transform.position.y < -5.0f) { Shoot(); if (count < 1 && toggle.isOn) { if (fIdx < 9) { if (center && fIdx > 6) { } else { GameObject go = Instantiate(gameObject) as GameObject; go.name = gameObject.name + (fIdx + 1); bulletEController bec = go.GetComponent <bulletEController>(); bec.fIdx = this.fIdx + 1; // bec.isMany = true; } } count++; } } }
void Create(GameObject bullet, int y) { GameObject go = Instantiate(bullet) as GameObject; go.name = bullet.name + y; bulletEController bec = go.GetComponent <bulletEController>(); bec.fIdx = y; if (center) { bec.center = true; } }