fixed cat dance and rest
This commit is contained in:
parent
a56961b8fc
commit
3d3a934972
|
|
@ -16,7 +16,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
[SerializeField] private float _zoomInPower = 4f;
|
[SerializeField] private float _zoomInPower = 4f;
|
||||||
|
|
||||||
private bool _rested = false;
|
private bool _rested = false;
|
||||||
private bool _restSound = true;
|
private LumBEARjack.RestSoundChoice _restSound;
|
||||||
|
|
||||||
private float _cameraPointZFrom;
|
private float _cameraPointZFrom;
|
||||||
private EasingFunction.Function _cameraFunc = EasingFunction.GetEasingFunction(EasingFunction.Ease.EaseOutBounce);
|
private EasingFunction.Function _cameraFunc = EasingFunction.GetEasingFunction(EasingFunction.Ease.EaseOutBounce);
|
||||||
|
|
@ -62,15 +62,29 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
_anim.DoScaledAnimationAsync("BeastBop", 0.5f);
|
_anim.DoScaledAnimationAsync("BeastBop", 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Rest(bool instant, bool sound)
|
public void Rest(bool instant, LumBEARjack.RestSoundChoice sound)
|
||||||
{
|
{
|
||||||
_anim.DoScaledAnimationAsync("BeastRest", 0.5f, instant ? 1 : 0);
|
_anim.DoScaledAnimationAsync("BeastRest", 0.5f, instant ? 1 : 0);
|
||||||
_rested = true;
|
_rested = true;
|
||||||
|
_restSound = sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestSound()
|
public void RestSound()
|
||||||
{
|
{
|
||||||
if (_restSound) SoundByte.PlayOneShotGame("lumbearjack/sigh" + (Random.Range(1, 3) == 1 ? "A" : "B"));
|
switch (_restSound)
|
||||||
|
{
|
||||||
|
case LumBEARjack.RestSoundChoice.Random:
|
||||||
|
SoundByte.PlayOneShotGame("lumbearjack/sigh" + (Random.Range(1, 3) == 1 ? "A" : "B"));
|
||||||
|
break;
|
||||||
|
case LumBEARjack.RestSoundChoice.restA:
|
||||||
|
SoundByte.PlayOneShotGame("lumbearjack/sighA");
|
||||||
|
break;
|
||||||
|
case LumBEARjack.RestSoundChoice.restB:
|
||||||
|
SoundByte.PlayOneShotGame("lumbearjack/sighB");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Coroutine _currentZoomCo;
|
private Coroutine _currentZoomCo;
|
||||||
|
|
|
||||||
|
|
@ -115,13 +115,13 @@ namespace HeavenStudio.Games.Loaders
|
||||||
function = delegate
|
function = delegate
|
||||||
{
|
{
|
||||||
var e = eventCaller.currentEntity;
|
var e = eventCaller.currentEntity;
|
||||||
LumBEARjack.instance.RestBear(e["instant"], e["sound"]);
|
LumBEARjack.instance.RestBear(e["instant"], (LumBEARjack.RestSoundChoice)e["sound"]);
|
||||||
},
|
},
|
||||||
defaultLength = 4,
|
defaultLength = 3,
|
||||||
parameters = new()
|
parameters = new()
|
||||||
{
|
{
|
||||||
new("instant", false, "Instant"),
|
new("instant", false, "Instant"),
|
||||||
new("sound", true, "Sound")
|
new("sound", LumBEARjack.RestSoundChoice.Random, "Sound")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -207,6 +207,14 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public class LumBEARjack : Minigame
|
public class LumBEARjack : Minigame
|
||||||
{
|
{
|
||||||
|
public enum RestSoundChoice
|
||||||
|
{
|
||||||
|
Random,
|
||||||
|
restA,
|
||||||
|
restB,
|
||||||
|
NoSound
|
||||||
|
}
|
||||||
|
|
||||||
public enum SmallType
|
public enum SmallType
|
||||||
{
|
{
|
||||||
log,
|
log,
|
||||||
|
|
@ -916,11 +924,11 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
if (bgCats < beforeBgCats)
|
if (bgCats < beforeBgCats)
|
||||||
{
|
{
|
||||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > bgCats && i <= beforeBgCats), dance, instant);
|
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > bgCats && i <= beforeBgCats), dance, instant || i <= bgCats);
|
||||||
}
|
}
|
||||||
else if (bgCats > beforeBgCats)
|
else if (bgCats > beforeBgCats)
|
||||||
{
|
{
|
||||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > beforeBgCats && i <= bgCats), dance, instant);
|
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > beforeBgCats && i <= bgCats), dance, instant || i <= beforeBgCats);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1034,7 +1042,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
#region Misc
|
#region Misc
|
||||||
|
|
||||||
public void RestBear(bool instant, bool sound)
|
public void RestBear(bool instant, RestSoundChoice sound)
|
||||||
{
|
{
|
||||||
_bear.Rest(instant, sound);
|
_bear.Rest(instant, sound);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue