Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
List<float> GetTimeProtsList(Vector3 speed, Vector3 gravity, int prots){
// 斜方投射後、地面に到達する時刻を計算
float landingTime = -2.0f * speed.y / gravity.y;
// 時刻格納用のリストを作成
List<float> timeProtsList = new List<float>();
// ガイドのプロット数が0なら作成直後の長さ0のリストを返す
if (prots <= 0){
return timeProtsList;
// プロット数に応じて、ガイドを表示する位置を計算するための時刻をリストに追加
for (int i = 1; i <= prots; i++){
float timeProt = i * landingTime / prots;
return timeProtsList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.