using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start( )
{
int point = 300 ;
int [ ] num = new int [ 10 ] ;
for ( int i = 0 ; i < 10 ; i++ )
{
if ( i == 9 )
num[ i] = point;
else if ( point == 0 )
num[ i] = 0 ;
else
{
int tmpPoint = Random.Range ( 0 , 61 ) ;
if ( tmpPoint < point)
{
num[ i] = tmpPoint;
point -= tmpPoint;
}
else
{
num[ i] = tmpPoint;
point = 0 ;
}
}
}
for ( int i = 0 ; i < num.Length ; i++ )
{
Debug.Log ( "パラメータ " + i + " = " + num[ i] ) ;
}
}
}
dXNpbmcgVW5pdHlFbmdpbmU7CgpwdWJsaWMgY2xhc3MgTmV3QmVoYXZpb3VyU2NyaXB0IDogTW9ub0JlaGF2aW91cgp7CiAgICAvLyBTdGFydCBpcyBjYWxsZWQgYmVmb3JlIHRoZSBmaXJzdCBmcmFtZSB1cGRhdGUKICAgIHZvaWQgU3RhcnQoKQogICAgewogICAgICAgIGludCBwb2ludCA9IDMwMDsKICAgICAgICBpbnRbXSBudW0gPSBuZXcgaW50WzEwXTsKICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IDEwOyBpKyspCiAgICAgICAgewogICAgICAgICAgICBpZiAoaSA9PSA5KQogICAgICAgICAgICAgICAgbnVtW2ldID0gcG9pbnQ7CiAgICAgICAgICAgIGVsc2UgaWYgKHBvaW50ID09IDApCiAgICAgICAgICAgICAgICBudW1baV0gPSAwOwogICAgICAgICAgICBlbHNlCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGludCB0bXBQb2ludCA9IFJhbmRvbS5SYW5nZSgwLCA2MSk7CiAgICAgICAgICAgICAgICBpZiAodG1wUG9pbnQgPCBwb2ludCkKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBudW1baV0gPSB0bXBQb2ludDsKICAgICAgICAgICAgICAgICAgICBwb2ludCAtPSB0bXBQb2ludDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBudW1baV0gPSB0bXBQb2ludDsKICAgICAgICAgICAgICAgICAgICBwb2ludCA9IDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbnVtLkxlbmd0aDsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgRGVidWcuTG9nKCLjg5Hjg6njg6Hjg7zjgr8gIiArIGkgKyAiID0gIiArIG51bVtpXSk7CiAgICAgICAgfQogICAgfQp9
compilation info
prog.cs(1,7): error CS0246: The type or namespace name `UnityEngine' could not be found. Are you missing an assembly reference?
prog.cs(3,35): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
Compilation failed: 2 error(s), 0 warnings
stdout