Rhytm minigame base
This commit is contained in:
1 parent
258900d1d6
commit
329cc98ade
7696 files changed
+238891
-619017
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using LitMotion;
|
||||
using LitMotion.Extensions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Game.Minigames.MusicGame.UI
|
||||
{
|
||||
public class MusicMinigameComboText : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text comboText;
|
||||
|
||||
[SerializeField] private float shakeStrength;
|
||||
[SerializeField] private float shakeDuration;
|
||||
|
||||
public async UniTaskVoid SetComboText(int combo)
|
||||
{
|
||||
LMotion.Shake
|
||||
.Create(1, shakeStrength, shakeDuration)
|
||||
.BindToLocalScaleXYZ(comboText.transform);
|
||||
|
||||
// StringBuilder
|
||||
comboText.SetText('x' + combo.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user