HeavenStudioPlus/Assets/Scripts/Games/ForkLifter/ForkLifterHand.cs

58 lines
2.2 KiB
C#
Raw Normal View History

2021-12-21 01:10:49 +00:00
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
2022-03-14 14:21:05 +00:00
using HeavenStudio.Util;
2021-12-21 01:10:49 +00:00
2022-03-14 14:21:05 +00:00
namespace HeavenStudio.Games.Scripts_ForkLifter
2021-12-21 01:10:49 +00:00
{
public class ForkLifterHand : MonoBehaviour
{
public SpriteRenderer fastSprite;
public Sprite[] fastSprites;
public void CheckNextFlick()
{
2022-01-15 18:46:50 +00:00
// var allPlayerActions = EventCaller.GetAllInGameManagerList("forkLifter", new string[] { "gulp", "sigh", "prepare" });
// var allPlayerActions = EventCaller.GetAllPlayerEntities("forkLifter");
// int currentPlayerEvent = GameManager.instance.currentEvent - EventCaller.GetAllPlayerEntitiesExceptBeforeBeat("forkLifter", Conductor.instance.songPositionInBeats).Count;
2021-12-21 01:10:49 +00:00
2022-01-15 18:46:50 +00:00
/* if (currentPlayerEvent < allPlayerActions.Count)
2021-12-21 01:10:49 +00:00
{
2021-12-24 03:36:16 +00:00
switch (allPlayerActions[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":
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[1];
2021-12-24 03:36:16 +00:00
fastSprite.sprite = fastSprites[0];
2021-12-21 01:10:49 +00:00
break;
case "burger":
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[2];
2021-12-24 03:36:16 +00:00
fastSprite.sprite = fastSprites[1];
2021-12-21 01:10:49 +00:00
break;
case "bottombun":
ForkLifter.instance.peaPreview.sprite = ForkLifter.instance.peaSprites[3];
2021-12-24 03:36:16 +00:00
fastSprite.sprite = fastSprites[0];
2021-12-21 01:10:49 +00:00
break;
}
}
else
{
ForkLifter.instance.peaPreview.sprite = null;
2022-01-15 18:46:50 +00:00
}*/
// will fix later
2021-12-21 01:10:49 +00:00
}
public void Prepare()
{
2021-12-23 22:39:03 +00:00
Jukebox.PlayOneShotGame("forkLifter/flickPrepare");
GetComponent<Animator>().Play("Hand_Prepare", 0, 0);
2021-12-21 01:10:49 +00:00
}
}
}