2021-12-21 01:10:49 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
using RhythmHeavenMania.Util;
|
|
|
|
|
|
|
|
namespace RhythmHeavenMania.Games.ForkLifter
|
|
|
|
{
|
|
|
|
public class ForkLifterHand : MonoBehaviour
|
|
|
|
{
|
|
|
|
public SpriteRenderer fastSprite;
|
|
|
|
|
|
|
|
public Sprite[] fastSprites;
|
|
|
|
|
2021-12-23 01:49:16 +00:00
|
|
|
List<Beatmap.Entity> allPlayerActions;
|
2021-12-21 01:10:49 +00:00
|
|
|
|
|
|
|
public void CheckNextFlick()
|
|
|
|
{
|
2021-12-23 01:49:16 +00:00
|
|
|
allPlayerActions = EventCaller.GetAllInGameManagerListExcept("forkLifter", new string[] { "gulp", "sigh", "prepare" });
|
2021-12-21 01:10:49 +00:00
|
|
|
|
2021-12-23 01:49:16 +00:00
|
|
|
if (GameManager.instance.currentPlayerEvent < allPlayerActions.Count)
|
2021-12-21 01:10:49 +00:00
|
|
|
{
|
2021-12-23 01:49:16 +00:00
|
|
|
switch (allPlayerActions[GameManager.instance.currentPlayerEvent].datamodel.Split('/')[1])
|
2021-12-21 01:10:49 +00:00
|
|
|
{
|
|
|
|
case "pea":
|
|
|
|
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[0];
|
|
|
|
fastSprite.sprite = fastSprites[0];
|
|
|
|
break;
|
|
|
|
case "topbun":
|
|
|
|
fastSprite.sprite = fastSprites[0];
|
|
|
|
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[1];
|
|
|
|
break;
|
|
|
|
case "burger":
|
|
|
|
fastSprite.sprite = fastSprites[1];
|
|
|
|
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[2];
|
|
|
|
break;
|
|
|
|
case "bottombun":
|
|
|
|
fastSprite.sprite = fastSprites[0];
|
|
|
|
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[3];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ForkLifter.instance.peaPreview.sprite = null;
|
2021-12-23 01:49:16 +00:00
|
|
|
}
|
2021-12-21 01:10:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void Prepare()
|
|
|
|
{
|
|
|
|
Jukebox.PlayOneShot("flickPrepare");
|
|
|
|
GetComponent<Animator>().Play("Hand_Prepare");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|