private void SpawThing() { SpawPoint spawPoint = GetSpawPoint(); FallThing fallThing = GetFallThing(); if (spawPoint == null || fallThing == null) { StartCoroutine("MyWaitSeconds", 1); return; } FallThingData fallThingData = fallThingsDataBase[Random.Range(0, fallThingsDataBase.Count)]; fallThing.Spawn(fallThingData.imageThing, fallThingData.speedFall, fallThingData.points, fallThingData.sfxClicked, spawPoint.rect.position); spawPoint.data.spawned = true; countThingsAtGame++; }
private void ClickFallThing(FallThing thing) { sfxController.PlayOneShot(thing.data.sfxClicked); thing.Colect(); SetPoints(thing.data.points); }