ステージクリアする毎に弾のスピードを徐々に上げるようにします。
ここでは、ステージクリアをレベルによって管理しているので、それを利用します。
StartShot.csを修正します。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StartShot : MonoBehaviour {
public float addSpeed; // ここを追加します。加算される係数を設定する。
// Use this for initialization
void Start () {
transform.eulerAngles = new Vector3(0, Random.Range(30, 120), 0);
gameObject.GetComponent<Rigidbody>().AddForce(transform.forward * (500 + (LevelManager.level * addSpeed))); <= ここを修正します。
}
// Update is called once per frame
void Update () {
}
}