コード例 #1
0
 // Use this for initialization
 public void init()
 {
     rand = Random.Range(0f, 10f);
     if (rand >= 6)
     {
         type = TypeRama.RIGHT;
     }
     else if (rand >= 2 && rand < 6)
     {
         type = TypeRama.LEFT;
     }
     else
     {
         type = TypeRama.NONE;
     }
     ramas[(int)type].gameObject.SetActive(true);
 }
コード例 #2
0
    // Use this for initialization
    public void Awake()
    {
        rand = (TypeRama)Random.Range(0f, 3f);

        ramas[(int)rand].gameObject.SetActive(true);
    }