Karate Man Additions Part 1 (#559)

* starting out with adding so many things

* voiceless kicks and combos (that one was easy)
* queuing objects/specials
* starting on cutting out the voice
 -i was using MultiSound.Delete() but i found it very inconsistent and janky so im switching to a check of the next block and if it should cut out the voice
* got rid of basically all of the static variables in favor of checking the last color blocks
 -also means that the bg and object colors getting held over between remixes shouldn't happen anymore
* removed all of the super backwards compatibility
 -im almost certain these blocks are only available in .tengoku files though, so nobody should have any issues

* convert karateman to karateMan

* conversion stuff start
* voice cutting fully works and is consistent now

color conversion isn't working, but ill fix it eventually
background color isn't working rn either, and moving to the new system has caused a lot of errors

* it compiles now

this Background Appearance block got hands ‼️
working on converting everything to the new bg color system
this will be so annoying to build a RiqUpdater for.

* bunch of small stuff

i got this done while i was at a cabin

* bg still broken :(

* unconvert karateman from karateMan, bg finally works

well. bg ALMOST finally works
i'll be doing the fx stuff after, and ill combine it with the flow block

* bg nearly done

* i just might give up on bg compatibility

i tried for like an hour and a half to convert it but i couldn't.
minenice might be able to but idk.

* background + lightbulb stuffs

* FINALLY got old bg blocks updating + better bulb sfx

store the keys of the objects in the dictionary that i want to remove, create the properties, then remove all of the objects using the keys.

bulbs use a method that lets any sfx go through for the throw and hit, which means custom lightbulb cues 😃

moved all queuing into one list, then a foreach checks the datamodel of each riqentity in the list

camera bug fixed (call update in awake and start)

recolorable barrels lol

* and with that, it's finished!

added backwards compatibility for bg fx and fixed the particles (oops i forgot to assign them in the inspector

* fixed a bug

the warning would not go away if you dragged the playback bar behind a warning cuz it wasn't checking for the beginning of a warning block

* oops forgot to remove a debug log
This commit is contained in:
AstrlJelly 2023-10-07 14:14:06 -04:00 committed by GitHub
parent 6c0680db6d
commit 6051b6c3f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1724 additions and 1744 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 6ad9f1d601adf9a4889010293bb854d4
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:

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 86fe61ed86cc5bd4cb8da587c4e4cc48
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:

View file

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 5e6b77f98971e73459639530f1524456
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:

View file

@ -241,35 +241,35 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -2381588529378463098}
m_Position: {x: 200, y: 0, z: 0}
m_Position: {x: 250, y: 110, z: 0}
- serializedVersion: 1
m_State: {fileID: -3348998483261200728}
m_Position: {x: 235, y: 65, z: 0}
m_Position: {x: 170, y: -30, z: 0}
- serializedVersion: 1
m_State: {fileID: -6746426325098372422}
m_Position: {x: 270, y: 130, z: 0}
m_Position: {x: 210, y: 40, z: 0}
- serializedVersion: 1
m_State: {fileID: 1136731949493752883}
m_Position: {x: 305, y: 195, z: 0}
m_Position: {x: 290, y: 180, z: 0}
- serializedVersion: 1
m_State: {fileID: -3478175207042509151}
m_Position: {x: 340, y: 260, z: 0}
m_Position: {x: 330, y: 250, z: 0}
- serializedVersion: 1
m_State: {fileID: -806466539819283022}
m_Position: {x: 375, y: 325, z: 0}
m_Position: {x: 370, y: 320, z: 0}
- serializedVersion: 1
m_State: {fileID: -3526870332612620235}
m_Position: {x: 410, y: 390, z: 0}
- serializedVersion: 1
m_State: {fileID: 1133350279288983051}
m_Position: {x: 445, y: 455, z: 0}
m_Position: {x: 450, y: 460, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_AnyStatePosition: {x: 40, y: 210, z: 0}
m_EntryPosition: {x: 470, y: 530, z: 0}
m_ExitPosition: {x: 110, y: 340, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1133350279288983051}

View file

@ -84,7 +84,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -5.8, y: 1.5, z: 0}
value: {x: -4, y: 1, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -116,14 +116,14 @@ AnimationClip:
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 0}
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Exclaim
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -8701253081129557890, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: -5610626859485252548, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
@ -206,8 +206,8 @@ AnimationClip:
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 0}
- {fileID: -8701253081129557890, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: -5610626859485252548, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
m_AnimationClipSettings:
serializedVersion: 2
@ -349,7 +349,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -5.8
value: -4
inSlope: 0
outSlope: 0
tangentMode: 136
@ -368,7 +368,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 1.5
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136

View file

@ -84,7 +84,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -4.72, y: 1.6, z: 0}
value: {x: -4.4, y: 1, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -116,14 +116,14 @@ AnimationClip:
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 0}
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Exclaim
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -2089169352201841507, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: 1214470814246859168, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
@ -206,8 +206,8 @@ AnimationClip:
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 0}
- {fileID: -2089169352201841507, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 1214470814246859168, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
m_AnimationClipSettings:
serializedVersion: 2
@ -349,7 +349,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -4.72
value: -4.4
inSlope: 0
outSlope: 0
tangentMode: 136
@ -368,7 +368,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 1.6
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136

View file

@ -14,6 +14,22 @@ AnimationClip:
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
- curve:
serializedVersion: 2
m_Curve:
@ -46,12 +62,13 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Main
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
value: {x: -1.403, y: 1, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -62,7 +79,6 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
@ -95,25 +111,16 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Main
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -1.403, y: 1, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 0}
attribute: m_Sprite
path: Sub
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
@ -123,18 +130,11 @@ AnimationClip:
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 1214470814246859168, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: 3512758288782026156, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 0}
attribute: m_Sprite
path: Sub
classID: 212
script: {fileID: 0}
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
@ -142,6 +142,13 @@ AnimationClip:
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1615840316
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 224731958
attribute: 0
@ -158,11 +165,11 @@ AnimationClip:
isPPtrCurve: 1
- serializedVersion: 2
path: 1615840316
attribute: 0
attribute: 1
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
typeID: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 224731958
attribute: 1
@ -179,10 +186,10 @@ AnimationClip:
isPPtrCurve: 0
- serializedVersion: 2
path: 1615840316
attribute: 1
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 0
customType: 4
isPPtrCurve: 0
- serializedVersion: 2
path: 224731958
@ -198,17 +205,10 @@ AnimationClip:
typeID: 4
customType: 4
isPPtrCurve: 0
- serializedVersion: 2
path: 1615840316
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 1214470814246859168, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 3512758288782026156, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
@ -230,6 +230,63 @@ AnimationClip:
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1.403
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
@ -287,63 +344,6 @@ AnimationClip:
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
@ -417,7 +417,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Main
path: Sub
classID: 4
script: {fileID: 0}
- curve:
@ -436,7 +436,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Main
path: Sub
classID: 4
script: {fileID: 0}
- curve:
@ -455,63 +455,6 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1.403
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path: Sub
classID: 4
script: {fileID: 0}
@ -531,7 +474,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Sub
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
@ -550,7 +493,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Sub
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
@ -569,10 +512,97 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Sub
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Main
classID: 4
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -633,36 +663,6 @@ AnimationClip:
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Sub
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View file

@ -14,22 +14,6 @@ AnimationClip:
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
- curve:
serializedVersion: 2
m_Curve:
@ -62,13 +46,12 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Main
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -1.403, y: 1, z: 0}
value: {x: 0, y: 0, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -79,6 +62,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
m_PositionCurves:
- curve:
serializedVersion: 2
m_Curve:
@ -111,16 +95,25 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path: Main
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -1.403, y: 1, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path: Sub
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 0}
attribute: m_Sprite
path: Sub
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
@ -130,11 +123,18 @@ AnimationClip:
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 3512758288782026156, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: -1278344009149830369, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: 0}
attribute: m_Sprite
path: Sub
classID: 212
script: {fileID: 0}
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
@ -142,13 +142,6 @@ AnimationClip:
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1615840316
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 224731958
attribute: 0
@ -165,11 +158,11 @@ AnimationClip:
isPPtrCurve: 1
- serializedVersion: 2
path: 1615840316
attribute: 1
attribute: 0
script: {fileID: 0}
typeID: 4
customType: 0
isPPtrCurve: 0
typeID: 212
customType: 23
isPPtrCurve: 1
- serializedVersion: 2
path: 224731958
attribute: 1
@ -186,10 +179,10 @@ AnimationClip:
isPPtrCurve: 0
- serializedVersion: 2
path: 1615840316
attribute: 4
attribute: 1
script: {fileID: 0}
typeID: 4
customType: 4
customType: 0
isPPtrCurve: 0
- serializedVersion: 2
path: 224731958
@ -205,10 +198,17 @@ AnimationClip:
typeID: 4
customType: 4
isPPtrCurve: 0
- serializedVersion: 2
path: 1615840316
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 0}
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 3512758288782026156, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: -1278344009149830369, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
@ -230,63 +230,6 @@ AnimationClip:
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1.403
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
@ -344,6 +287,63 @@ AnimationClip:
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
@ -417,7 +417,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Sub
path: Main
classID: 4
script: {fileID: 0}
- curve:
@ -436,7 +436,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Sub
path: Main
classID: 4
script: {fileID: 0}
- curve:
@ -455,6 +455,63 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -1.403
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalPosition.z
path: Sub
classID: 4
script: {fileID: 0}
@ -474,7 +531,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Exclaim
path: Sub
classID: 4
script: {fileID: 0}
- curve:
@ -493,7 +550,7 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Exclaim
path: Sub
classID: 4
script: {fileID: 0}
- curve:
@ -512,97 +569,10 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Exclaim
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path: Main
path: Sub
classID: 4
script: {fileID: 0}
m_EulerEditorCurves:
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
@ -663,6 +633,36 @@ AnimationClip:
path: Main
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path: Sub
classID: 4
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path: Sub
classID: 4
script: {fileID: 0}
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View file

@ -84,7 +84,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -4.4, y: 1, z: 0}
value: {x: -4.72, y: 1.6, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -116,14 +116,14 @@ AnimationClip:
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: 0}
attribute: m_Sprite
path: Exclaim
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -1278344009149830369, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: -2089169352201841507, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
@ -206,8 +206,8 @@ AnimationClip:
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: -1278344009149830369, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
- {fileID: -2089169352201841507, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
m_AnimationClipSettings:
serializedVersion: 2
@ -349,7 +349,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -4.4
value: -4.72
inSlope: 0
outSlope: 0
tangentMode: 136
@ -368,7 +368,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 1.6
inSlope: 0
outSlope: 0
tangentMode: 136

View file

@ -84,7 +84,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -4, y: 1, z: 0}
value: {x: -5.8, y: 1.5, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
@ -116,14 +116,14 @@ AnimationClip:
m_PPtrCurves:
- curve:
- time: 0
value: {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: 0}
attribute: m_Sprite
path: Exclaim
classID: 212
script: {fileID: 0}
- curve:
- time: 0
value: {fileID: -5610626859485252548, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
value: {fileID: -8701253081129557890, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
attribute: m_Sprite
path: Main
classID: 212
@ -206,8 +206,8 @@ AnimationClip:
customType: 4
isPPtrCurve: 0
pptrCurveMapping:
- {fileID: 7844610654334982216, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: -5610626859485252548, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
- {fileID: -8701253081129557890, guid: 57ea36e082ce7e44581fa6fdb2cd7a49, type: 3}
- {fileID: 0}
m_AnimationClipSettings:
serializedVersion: 2
@ -349,7 +349,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: -4
value: -5.8
inSlope: 0
outSlope: 0
tangentMode: 136
@ -368,7 +368,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 1.5
inSlope: 0
outSlope: 0
tangentMode: 136

View file

@ -3,7 +3,7 @@ guid: 2126ec8bc0fd27047a483933dcc9f9b0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
@ -24,6 +24,7 @@ TextureImporter:
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
@ -35,15 +36,15 @@ TextureImporter:
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
wrapU: 2
wrapV: 2
wrapW: 2
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 400
@ -62,6 +63,7 @@ TextureImporter:
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
@ -87,6 +89,18 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
@ -100,6 +114,7 @@ TextureImporter:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public Color BombGlowTint;
double bombGlowStart = double.MinValue;
float bombGlowLength = 0f;
float bombGlowIntensity;
float bombGlowIntensity = 0f;
const float bombGlowRatio = 1f;
double lastPunchTime = double.MinValue;
@ -46,10 +46,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
Conductor.instance.GetPositionFromBeat(lastChargeTime, 2.75f) <= 0.25f || inNuriLock; } }
public bool inNuriLock { get { return (Conductor.instance.songPositionInBeatsAsDouble >= noNuriJabTime && Conductor.instance.songPositionInBeatsAsDouble < noNuriJabTime + 1f); } }
private void Awake()
{
}
private void Update()
{
var cond = Conductor.instance;
@ -68,7 +64,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
bombGlowLength = 0f;
}
}
UpdateShadowColour();
UpdateJoeColour();
if (canEmote && wantFace >= 0)
{
@ -334,15 +330,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
canEmote = false;
}
public void UpdateShadowColour()
public void UpdateJoeColour()
{
foreach (var shadow in Shadows)
{
shadow.color = KarateMan.instance.GetShadowColor();
}
Color mainCol = KarateMan.BodyColor;
Color highlightCol = KarateMan.HighlightColor;
Color mainCol = KarateMan.instance.BodyColor;
Color highlightCol = KarateMan.instance.HighlightColor;
if (bombGlowIntensity > 0)
{
@ -383,6 +374,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public void RemoveBombGlow(double beat, float length = 0.5f)
{
if (double.IsNaN(bombGlowIntensity)) return;
bombGlowStart = beat;
bombGlowLength = length;
bombGlowIntensity = 0f;

View file

@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Jukebox;
using HeavenStudio.Util;
@ -53,10 +54,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
float scaleFactor = 0f;
//clear all children of the holder
if (NoriHolder != null)
{
foreach (Transform child in NoriHolder)
{
if (NoriHolder != null) {
foreach (Transform child in NoriHolder) {
Destroy(child.gameObject);
}
}
@ -81,9 +80,20 @@ namespace HeavenStudio.Games.Scripts_KarateMan
NoriManiaInk01.SetActive(false);
playedJust = false;
inputsToSwitch = KarateMan.CountHitsToEnd(fromBeat);
inputsToSwitch = CountHitsToEnd(fromBeat);
break;
default:
case (int) KarateMan.NoriMode.ManiaHorizontal:
MaxNori = 10;
Nori = Mathf.Clamp(startingNori, 0, MaxNori);
scaleFactor = ScaleFactorMania;
NoriHolder = NoriHolderMania01;
NoriManiaInk00.SetActive(true);
NoriManiaInk01.SetActive(true);
playedJust = false;
inputsToSwitch = CountHitsToEnd(fromBeat);
break;
default: //KarateMan.NoriMode.None
MaxNori = 0;
Nori = 0;
NoriManiaInk00.SetActive(false);
@ -238,23 +248,16 @@ namespace HeavenStudio.Games.Scripts_KarateMan
Material mat = NoriHeartMaterials[i];
if (noriMode == (int) KarateMan.NoriMode.Tengoku)
{
if (Nori == MaxNori)
{
if (Nori == MaxNori) {
mat.SetColor("_ColorAlpha", NoriColorsTengoku[3]);
}
else
{
if (KarateMan.instance.NoriPerformance < 0.6)
} else if (KarateMan.instance.NoriPerformance < 0.6) {
mat.SetColor("_ColorAlpha", NoriColorsTengoku[0]);
else
{
if (i < 2)
} else if (i < 2) {
mat.SetColor("_ColorAlpha", NoriColorsTengoku[1]);
else
} else {
mat.SetColor("_ColorAlpha", NoriColorsTengoku[2]);
}
}
}
else
{
Color c = NoriColorsMania[0];
@ -270,11 +273,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
flashPeriod = Mathf.Sin(cond.songPositionInBeats * Mathf.PI);
if (KarateMan.instance.NoriPerformance < 0.6)
c = NoriColorsMania[0];
else
{
if (i < MaxNori - 2)
else if (i < MaxNori - 2) {
c = NoriColorsMania[1];
else
} else {
c = NoriColorsMania[2];
}
c *= (flashPeriod * 0.5f) + 1f;
@ -295,9 +296,45 @@ namespace HeavenStudio.Games.Scripts_KarateMan
UpdateHeartColours();
float inkRot = (Conductor.instance.songPositionInBeats/ 8f) % 1f;
float inkRot = (Conductor.instance.songPositionInBeats / 8f) % 1f;
NoriManiaInk00.transform.localRotation = Quaternion.Euler(0, 0, inkRot * 360);
NoriManiaInk01.transform.localRotation = Quaternion.Euler(0, 0, inkRot * 360);
}
public int CountHitsToEnd(double fromBeat)
{
List<RiqEntity> allHits = EventCaller.GetAllInGameManagerList("karateman", new string[] { "hit", "bulb", "kick", "combo" });
List<RiqEntity> allEnds = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame", "end" });
allHits.Sort((x, y) => x.beat.CompareTo(y.beat));
allEnds.Sort((x, y) => x.beat.CompareTo(y.beat));
double endBeat = double.MaxValue;
//get the beat of the closest end event
foreach (var end in allEnds) {
if (end.beat > fromBeat) {
endBeat = end.beat;
break;
}
}
//count each hit event beginning from our current beat to the beat of the closest game switch or end
int count = 0;
string type;
for (int i = 0; i < allHits.Count; i++)
{
RiqEntity h = allHits[i];
if (h.beat >= fromBeat)
{
if (h.beat < endBeat) {
//kicks and combos count for 2 hits
type = h.datamodel.Split('/')[1];
count += (type is "kick" or "combo") ? 2 : 1;
} else {
break;
}
}
}
return count;
}
}
}

View file

@ -13,10 +13,12 @@ namespace HeavenStudio.Games.Scripts_KarateMan
public double startBeat;
public ItemType type;
public int path = 1;
public string hitSfxOverride;
public GameObject Shadow;
public GameObject ShadowInstance;
SpriteRenderer shadowRenderer;
private GameObject ShadowInstance;
private SpriteRenderer shadowRenderer;
//hit effects
public GameObject HitMark;
@ -28,12 +30,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
[SerializeField] SpriteRenderer[] cellRenderers;
Material[] cellMaterials;
public Color[] ItemBarrelMap;
[SerializeField] Color[] ItemAlienMap;
[SerializeField] Color[] ItemBombMap;
[SerializeField] Color[] ItemBarrelMap;
[SerializeField] Color[] ItemCookingLidMap;
public bool KickBarrelContent = false;
public bool ShouldGlow = false;
public int OnHitExpression = (int) KarateMan.KarateManFaces.Normal;
public int comboId = -1;
@ -128,13 +131,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
case ItemType.Alien:
alpha = ItemAlienMap[0];
bravo = ItemAlienMap[1];
delta = KarateMan.ItemColor;
delta = KarateMan.instance.ItemColor;
break;
case ItemType.Bomb:
case ItemType.KickBomb:
alpha = ItemBombMap[0];
bravo = ItemBombMap[1];
delta = KarateMan.ItemColor;
delta = KarateMan.instance.ItemColor;
break;
case ItemType.KickBarrel:
case ItemType.ComboBarrel:
@ -146,12 +149,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
case ItemType.CookingLid:
alpha = ItemCookingLidMap[0];
bravo = ItemCookingLidMap[1];
delta = KarateMan.ItemColor;
delta = KarateMan.instance.ItemColor;
break;
default:
alpha = KarateMan.ItemColor;
bravo = KarateMan.ItemColor;
delta = KarateMan.ItemColor;
alpha = bravo = delta = KarateMan.instance.ItemColor;
break;
}
for (int i = 0; i < cellRenderers.Length; i++) {
@ -254,9 +255,11 @@ namespace HeavenStudio.Games.Scripts_KarateMan
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (-360f * Time.deltaTime) + UnityEngine.Random.Range(0f, 360f));
ShadowInstance = GameObject.Instantiate(Shadow, KarateMan.instance.ItemHolder);
ShadowInstance = Instantiate(Shadow, KarateMan.instance.ItemHolder);
shadowRenderer = ShadowInstance.GetComponent<SpriteRenderer>();
shadowRenderer.color = KarateMan.instance.GetShadowColor();
shadowRenderer.color = KarateMan.instance.Joe.Shadows[0].color;
ShadowInstance.SetActive(true);
ShadowInstance.transform.position = new Vector3(transform.position.x, floorHeight - 0.5f, transform.position.z);
}
@ -289,8 +292,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], transform.position, Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else if (prog >= 2f || (ItemKickable() && prog >= 1f)) {
@ -299,8 +302,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[6].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
}
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else if (CurrentCurve == null && prog < 1f - ItemSlipRt[path]) {
@ -318,8 +321,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
SoundByte.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
return;
@ -334,8 +337,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
else if (type == ItemType.KickBall && cond.songPositionInBeatsAsDouble < startBeat + curveTargetBeat + 1f)
return;
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else {
@ -359,8 +362,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else if (cond.songPositionInBeatsAsDouble >= startBeat + Mathf.Max(2f, curveTargetBeat) || (ItemKickable() && prog >= 1f) || CurrentCurve == null) {
@ -369,8 +372,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[8].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
}
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else {
@ -396,14 +399,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
ParticleSystem p = Instantiate(HitParticles[7], pos, Quaternion.identity, KarateMan.instance.ItemHolder);
p.Play();
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
else if (cond.songPositionInBeatsAsDouble >= startBeat + 3f)
{
GameObject.Destroy(ShadowInstance.gameObject);
GameObject.Destroy(gameObject);
Destroy(ShadowInstance.gameObject);
Destroy(gameObject);
return;
}
if (prog <= 1f)
@ -414,13 +417,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
break;
}
ShadowInstance.transform.position = new Vector3(transform.position.x, floorHeight - 0.5f, transform.position.z);
shadowRenderer.color = KarateMan.instance.GetShadowColor();
shadowRenderer.color = KarateMan.instance.Joe.Shadows[0].color;
SetColourMapping();
}
void CreateHitMark(bool useLocalPos = false)
{
GameObject hitMark = GameObject.Instantiate(HitMark, KarateMan.instance.ItemHolder);
GameObject hitMark = Instantiate(HitMark, KarateMan.instance.ItemHolder);
if (useLocalPos)
hitMark.transform.localPosition = transform.position;
else
@ -439,8 +442,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
case ItemType.Bulb:
CurrentCurve = ItemCurves[straight ? 1 : 0];
curveTargetBeat = straight ? 1f : 1.5f;;
SoundByte.PlayOneShotGame("karateman/lightbulbHit", forcePlay: true);
curveTargetBeat = straight ? 1f : 1.5f;
SoundByte.PlayOneShotGame(hitSfxOverride ?? "karateman/lightbulbHit", forcePlay: true);
p = Instantiate(HitParticles[5], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
if (effectTint.a == 0)
@ -565,11 +568,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
p.Play();
break;
case ItemType.KickBarrel:
if (KickBarrelContent)
if (KickBarrelContent) {
game.CreateItemInstance(startBeat + 1f, "Item03", OnHitExpression, ItemType.KickBall);
else
{
game.Joe.ApplyBombGlow();
} else {
if (ShouldGlow) game.Joe.ApplyBombGlow();
game.CreateItemInstance(startBeat + 1f, "Item04", OnHitExpression, ItemType.KickBomb);
}
SoundByte.PlayOneShotGame("karateman/barrelBreak", forcePlay: true);