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
|
|
|
|
{
|
2023-05-07 20:33:15 +00:00
|
|
|
public class Translator : MonoBehaviour
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
public Animator anim;
|
|
|
|
|
|
|
|
FirstContact game;
|
|
|
|
|
|
|
|
public void Init()
|
|
|
|
{
|
|
|
|
game = FirstContact.instance;
|
|
|
|
//anim = GetComponent<Animator>();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-03-27 03:09:55 +00:00
|
|
|
public void SuccessTranslation(bool ace)
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
if (ace)
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("firstContact/" + RandomizerLines());
|
2022-07-25 08:04:16 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("firstContact/failContact");
|
2022-07-25 08:04:16 +00:00
|
|
|
}
|
|
|
|
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(this, new List<BeatAction.Action>()
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
{
|
2023-06-10 19:13:29 +00:00
|
|
|
SoundByte.PlayOneShotGame("firstContact/slightlyFail");
|
2023-09-11 22:28:04 +00:00
|
|
|
BeatAction.New(this, new List<BeatAction.Action>()
|
2022-07-25 08:04:16 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|