스페이스바 누름 구현

This commit is contained in:
김도환
2026-05-01 04:03:39 +09:00
parent 425863e9c9
commit 162b58c17d
392 changed files with 115972 additions and 1142 deletions

View File

@@ -0,0 +1,26 @@
using UnityEngine;
public static class Randomizer
{
private static readonly int[][] Numbers = new int[][]
{ new int[]
{
320, 40, 20, 12, 4, 3, 1
}, new int[]
{
0, 1, 3, 5, 8, 9, 15
} };
public static int GetResult()
{
var value = Random.Range(0, 400);
var count = 0;
for (var i = 0; i < Numbers[0].Length; i++)
{
count += Numbers[0][i];
if (value < count) return Numbers[1][i];
}
return Numbers[1][Numbers[1].Length - 1];
}
}