mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 12:47:38 +02:00
Coin Toss Functionnal (Needs Miss and Blank animation)
This commit is contained in:
@ -27,16 +27,16 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
|
||||
public static CoinToss instance { get; set; }
|
||||
|
||||
public Boolean isThrowing;
|
||||
|
||||
public GameObject coin_cue;
|
||||
|
||||
[Header("Animators")]
|
||||
public Animator handAnimator;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
isThrowing = false;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@ -55,7 +55,24 @@ namespace HeavenStudio.Games
|
||||
handAnimator.Play("Throw", 0, 0);
|
||||
|
||||
isThrowing = true;
|
||||
|
||||
GameObject coin = Instantiate(coin_cue);
|
||||
coin.SetActive(true);
|
||||
Coin c = coin.GetComponent<Coin>();
|
||||
c.startBeat = beat;
|
||||
}
|
||||
|
||||
public void Catch_Success()
|
||||
{
|
||||
Jukebox.PlayOneShotGame("coinToss/catch");
|
||||
handAnimator.Play("Catch_success", 0, 0);
|
||||
|
||||
isThrowing = false;
|
||||
}
|
||||
|
||||
public void Catch_Miss()
|
||||
{
|
||||
Jukebox.PlayOneShotGame("coinToss/miss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user