예제 #1
0
        private void Start()
        {
            human            = GetComponent <Human>();
            dayNightCycle    = Camera.main.GetComponent <DayNightCycle>();
            terrainGenerator = Camera.main.GetComponent <TerrainGenerator>();

            human.woodAmount = Random.Range(1, 4);
        }
예제 #2
0
파일: Human.cs 프로젝트: Firellon/LD48
 private void Start()
 {
     body             = GetComponent <Rigidbody2D>();
     renderer         = GetComponent <SpriteRenderer>();
     terrainGenerator = Camera.main.GetComponent <TerrainGenerator>();
     dayNightCycle    = Camera.main.GetComponent <DayNightCycle>();
     levelSize        = terrainGenerator.levelSize;
     if (!audio)
     {
         audio = GetComponent <AudioSource>();
     }
 }