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

            human.woodAmount = Random.Range(1, 4);
        }
Exemple #2
0
 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>();
     }
 }