// 진행 방향으로 돌아 EnemyBullet을 발사한다. public void shootBullet() { GameObject go = GameObject.Instantiate(CharacterRoot.get().enemy_bullet_prefab) as GameObject; go.transform.position = this.transform.TransformPoint(new Vector3(0.0f, 0.25f, 1.0f)); go.transform.rotation = Quaternion.AngleAxis(this.control.getDirection(), Vector3.up); EnemyBulletControl bullet = go.GetComponent <EnemyBulletControl>(); bullet.owner = this.control; }
// 進行方向へ向けて EnemyBullet を発射する public void PerformFire() { GameObject go = GameObject.Instantiate(CharacterRoot.getInstance().enemy_bullet_prefab) as GameObject; go.transform.position = this.transform.TransformPoint(new Vector3(0.0f, 0.25f, 1.0f)); go.transform.rotation = Quaternion.AngleAxis(this.getDirection(), Vector3.up); EnemyBulletControl bullet = go.GetComponent <EnemyBulletControl>(); bullet.owner = this; // 弾丸の発射待ち this.refireDelayTimer = refireDelayTime; }