シューティングゲームで加速弾を作っているのですが、初期値に、毎回加速する数値(加算していく数値)が、初期値に代入されたまま加速してくれません。
public float BS=0.1f;
private Vector2 threep;
public float Acceleration=0.5f;
public float MaxAcceleration=20.0f;
update(){
BS += Acceleration;
threep = Vector2.down * BS;
BS = Mathf.Min(Acceleration,MaxAcceleration);
transform.Translate(threep);
}
コードはこんな感じです。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/09/14 13:03