mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-30 05:23:06 +00:00
flow bar reactions
This commit is contained in:
parent
5b3c0584f3
commit
99b2294561
9 changed files with 84 additions and 10 deletions
|
@ -31493,7 +31493,7 @@ SpriteRenderer:
|
|||
m_SortingLayer: 0
|
||||
m_SortingOrder: 99
|
||||
m_Sprite: {fileID: 21300000, guid: 8d47d8089ec1a3f40a5873ac60190d2b, type: 3}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.78431374}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
|
@ -62310,7 +62310,7 @@ SpriteRenderer:
|
|||
m_SortingLayer: 0
|
||||
m_SortingOrder: 99
|
||||
m_Sprite: {fileID: 21300000, guid: 8d47d8089ec1a3f40a5873ac60190d2b, type: 3}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.78431374}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
|
|
BIN
Assets/Resources/Sfx/games/karateman/nori_just.wav
Normal file
BIN
Assets/Resources/Sfx/games/karateman/nori_just.wav
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/karateman/nori_just.wav.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/nori_just.wav.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0c60a305e3872c647a8fe99088aba6b0
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sfx/games/karateman/nori_ng.wav
Normal file
BIN
Assets/Resources/Sfx/games/karateman/nori_ng.wav
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/karateman/nori_ng.wav.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/nori_ng.wav.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1c41c652083944441a5b3844e5920329
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sfx/games/karateman/nori_through.wav
Normal file
BIN
Assets/Resources/Sfx/games/karateman/nori_through.wav
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/karateman/nori_through.wav.meta
Normal file
22
Assets/Resources/Sfx/games/karateman/nori_through.wav.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ef84a567e7fe90b4d84764cafa6887d3
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 6
|
||||
defaultSettings:
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
preloadAudioData: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -39,8 +39,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
int noriMode = (int)KarateMan.NoriMode.None;
|
||||
|
||||
int inputsToSwitch = 0;
|
||||
//takes 10% of inputs to fill the nori bar
|
||||
float hitNoriAdd { get { return MaxNori / (inputsToSwitch * 0.15f); } }
|
||||
//takes 12% of inputs to fill the nori bar
|
||||
float hitNoriAdd { get { return MaxNori / (inputsToSwitch * 0.12f); } }
|
||||
|
||||
|
||||
void Start()
|
||||
|
@ -79,7 +79,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
NoriManiaInk01.SetActive(false);
|
||||
|
||||
inputsToSwitch = KarateMan.CountHitsToEnd(fromBeat);
|
||||
Debug.Log($"inputs to segment end: {inputsToSwitch}");
|
||||
break;
|
||||
default:
|
||||
MaxNori = 0;
|
||||
|
@ -118,6 +117,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
public void DoHit()
|
||||
{
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
float oldNori = Nori;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
Nori += 1;
|
||||
|
@ -127,22 +127,25 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
else
|
||||
{
|
||||
float oldNori = Nori;
|
||||
Nori += hitNoriAdd;
|
||||
if (Nori > MaxNori) Nori = MaxNori;
|
||||
Debug.Log($"Nori: {Nori}, added {hitNoriAdd}, old nori: {oldNori}");
|
||||
for (int i = 0; i < MaxNori; i++)
|
||||
{
|
||||
if (i <= (int) Nori && i >= (int) oldNori)
|
||||
NoriHeartAnimators[i].Play("NoriFull", -1, (Time.time * PeriodHigh) % 1f);
|
||||
}
|
||||
}
|
||||
if (KarateMan.instance.NoriPerformance >= 0.6 && oldNori / MaxNori < 0.6)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/nori_just");
|
||||
}
|
||||
UpdateHeartColours();
|
||||
}
|
||||
|
||||
public void DoNG()
|
||||
{
|
||||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
float oldNori = Nori;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
Nori -= 1;
|
||||
|
@ -153,7 +156,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
Nori -= hitNoriAdd;
|
||||
if (Nori < 0) Nori = 0;
|
||||
Debug.Log($"Nori: {Nori}, removed {hitNoriAdd}");
|
||||
if (Nori == 0)
|
||||
{
|
||||
foreach (Animator anim in NoriHeartAnimators)
|
||||
|
@ -170,6 +172,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
}
|
||||
if (KarateMan.instance.NoriPerformance < 0.6 && oldNori / MaxNori >= 0.6)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/nori_ng");
|
||||
}
|
||||
UpdateHeartColours();
|
||||
}
|
||||
|
||||
|
@ -178,6 +184,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
if (noriMode == (int) KarateMan.NoriMode.None) return;
|
||||
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
|
||||
{
|
||||
if (Nori >= MaxNori)
|
||||
Jukebox.PlayOneShotGame("karateman/nori_through");
|
||||
Nori = 0;
|
||||
foreach (Animator anim in NoriHeartAnimators)
|
||||
{
|
||||
|
@ -188,7 +196,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
Nori -= hitNoriAdd * 2;
|
||||
if (Nori < 0) Nori = 0;
|
||||
Debug.Log($"Nori: {Nori}, removed {hitNoriAdd * 4}");
|
||||
if (Nori == 0)
|
||||
{
|
||||
foreach (Animator anim in NoriHeartAnimators)
|
||||
|
@ -243,7 +250,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
flashPeriod = Mathf.Sin((cond.songPositionInBeats - i / (float) MaxNori) * Mathf.PI);
|
||||
c = NoriColorsMania[2] + (NoriColorsMania[3] * ((1 - flashPeriod * 0.5f) + 0.5f));
|
||||
s = Color.HSVToRGB(((cond.songPositionInBeats + 0.5f) * 4) % 1, 1, flashPeriod * 0.75f + 0.25f);
|
||||
s = Color.HSVToRGB(((cond.songPositionInBeats + 0.5f) * 4) % 1, 1, flashPeriod * 0.6f + 0.4f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -574,6 +574,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
Debug.Log("ItemJustOrNg | accuracy: " + state);
|
||||
if (status == FlyStatus.Fly && !(joe.inCombo || joe.inNuriLock)) {
|
||||
if (state <= -1f || state >= 1f) {
|
||||
bool straight = joe.Punch(ItemPunchHand());
|
||||
|
|
Loading…
Reference in a new issue