2022-07-25 08:04:16 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
using DG.Tweening;
|
|
|
|
using HeavenStudio.Util;
|
|
|
|
using Starpelly;
|
|
|
|
|
|
|
|
namespace HeavenStudio.Games.Scripts_FirstContact
|
|
|
|
{
|
|
|
|
public class Translator : PlayerActionObject
|
|
|
|
{
|
|
|
|
public Animator anim;
|
|
|
|
|
|
|
|
FirstContact game;
|
|
|
|
|
|
|
|
public void Init()
|
|
|
|
{
|
|
|
|
game = FirstContact.instance;
|
|
|
|
//anim = GetComponent<Animator>();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
{
|
|
|
|
////IF YOU WANT TO PLAY NOTES ANYTIME W/O CONSTRAINTS
|
|
|
|
//if (PlayerInput.Pressed(true) && !game.isSpeaking)
|
|
|
|
//{
|
|
|
|
// successTranslation(true);
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
|
2023-03-27 03:09:55 +00:00
|
|
|
public void SuccessTranslation(bool ace)
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
if (ace)
|
|
|
|
{
|
|
|
|
//if(game.version == 1)
|
|
|
|
//{
|
|
|
|
// Jukebox.PlayOneShotGame("firstContact/citrusRemix/1_r");
|
|
|
|
//}
|
2023-03-27 03:09:55 +00:00
|
|
|
Jukebox.PlayOneShotGame("firstContact/" + RandomizerLines());
|
2022-07-25 08:04:16 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Jukebox.PlayOneShotGame("firstContact/failContact");
|
|
|
|
}
|
|
|
|
|
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(.5f, delegate { anim.Play("translator_speak", 0, 0);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-03-27 03:09:55 +00:00
|
|
|
public void EhTranslation()
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
Jukebox.PlayOneShotGame("firstContact/slightlyFail");
|
|
|
|
BeatAction.New(this.gameObject, new List<BeatAction.Action>()
|
|
|
|
{
|
|
|
|
new BeatAction.Action(.5f, delegate { anim.Play("translator_eh", 0, 0);}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-03-27 03:09:55 +00:00
|
|
|
public int RandomizerLines()
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
2023-03-27 03:09:55 +00:00
|
|
|
return Random.Range(1, 11);
|
2022-07-25 08:04:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|