feat: Rose grow animation
This commit is contained in:
		
							parent
							
								
									f8a29f1501
								
							
						
					
					
						commit
						438b16fc6e
					
				
					 9 changed files with 186 additions and 4 deletions
				
			
		|  | @ -3,14 +3,21 @@ using Domain.Input; | |||
| using Presenter; | ||||
| using TMPro; | ||||
| using UnityEngine; | ||||
| using UnityEngine.Serialization; | ||||
| 
 | ||||
| namespace View.UI { | ||||
| 	public class ExpressionInput : MonoBehaviour, IExpressionInput { | ||||
| 		[SerializeField] private TMP_Text text; | ||||
| 
 | ||||
| 		private ExpressionClick _click; | ||||
| 		private CustomInput _customInput; | ||||
| 		private Model _model; | ||||
| 
 | ||||
| 		[SerializeField] private FramedAnimator.FramedAnimator animator; | ||||
| 
 | ||||
| 		private void Start() { | ||||
| 			_model = FindObjectOfType<Dependencies>().Model; | ||||
| 
 | ||||
| 			_click = FindObjectOfType<Dependencies>().ExpressionClick; | ||||
| 			_customInput = FindObjectOfType<Dependencies>().CustomInput; | ||||
| 		} | ||||
|  | @ -43,6 +50,9 @@ namespace View.UI { | |||
| 		} | ||||
| 
 | ||||
| 		public void UpdateView(int score) { | ||||
| 			int frameDifference = score % _model.SpawnRate; | ||||
| 			animator.PlayUntil(frameDifference / (float)_model.SpawnRate); | ||||
| 
 | ||||
| 			text.text = score.ToString(); | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gerard Gascón
						Gerard Gascón