feat: spawned roses variation
This commit is contained in:
parent
2cddb7a7b9
commit
c24e9d11cf
8 changed files with 138 additions and 33 deletions
|
@ -24,7 +24,7 @@ namespace Presenter {
|
|||
_onInputReceived.OnInputReceived();
|
||||
|
||||
if (CanSpawn) {
|
||||
if(_score.Value > Score.InitialRosesThreshold)
|
||||
if(_score.Roses > Score.InitialRosesThreshold)
|
||||
_spawner.SpawnRose();
|
||||
else
|
||||
_spawner.SpawnInitialRose();
|
||||
|
|
|
@ -5,9 +5,13 @@ using Random = UnityEngine.Random;
|
|||
namespace View.Scene {
|
||||
public class GardenFlower : MonoBehaviour {
|
||||
[SerializeField] private SpriteRenderer sprite;
|
||||
|
||||
[SerializeField] private Sprite[] randomSprites;
|
||||
|
||||
private static readonly int WindOffset = Shader.PropertyToID("_WindOffset");
|
||||
|
||||
private void Awake() {
|
||||
sprite.sprite = randomSprites[Random.Range(0, randomSprites.Length)];
|
||||
sprite.material.SetFloat(WindOffset, Random.Range(0f, 2f * Mathf.PI));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue