mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 22:25:07 +00:00
dd9a06ad52
* license change replace unneeded package * reword this
58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using DG.Tweening;
|
|
using HeavenStudio.Util;
|
|
|
|
|
|
namespace HeavenStudio.Games.Scripts_FirstContact
|
|
{
|
|
public class Translator : MonoBehaviour
|
|
{
|
|
public Animator anim;
|
|
|
|
FirstContact game;
|
|
|
|
public void Init()
|
|
{
|
|
game = FirstContact.instance;
|
|
//anim = GetComponent<Animator>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public void SuccessTranslation(bool ace)
|
|
{
|
|
if (ace)
|
|
{
|
|
SoundByte.PlayOneShotGame("firstContact/" + RandomizerLines());
|
|
}
|
|
else
|
|
{
|
|
SoundByte.PlayOneShotGame("firstContact/failContact");
|
|
}
|
|
|
|
BeatAction.New(this, new List<BeatAction.Action>()
|
|
{
|
|
new BeatAction.Action(.5f, delegate { anim.Play("translator_speak", 0, 0);}),
|
|
});
|
|
}
|
|
|
|
public void EhTranslation()
|
|
{
|
|
SoundByte.PlayOneShotGame("firstContact/slightlyFail");
|
|
BeatAction.New(this, new List<BeatAction.Action>()
|
|
{
|
|
new BeatAction.Action(.5f, delegate { anim.Play("translator_eh", 0, 0);}),
|
|
});
|
|
}
|
|
|
|
public int RandomizerLines()
|
|
{
|
|
return Random.Range(1, 11);
|
|
}
|
|
}
|
|
}
|