예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     roomTemplates = GameObject.Find("Station").GetComponent <RoomTemplates>();
     if (roomTemplates.GetRandomValue() % 2 == 0)
     {
         Destroy(transform.gameObject);
     }
 }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        roomTemplates = GameObject.Find("Station").GetComponent <RoomTemplates>();
        int rand = roomTemplates.GetRandomValue();

        transform.rotation = Quaternion.Euler(0, rand % 180, 0);
        if (rand % 2 == 0)
        {
            Destroy(transform.gameObject);
        }
        // transform.gameObject.SetActive(rand % 2 == 0);
    }