Dog Ninja Tweaks (#336)

* starting out with double date stuff :D

not even the background is finished
i just wanna get this on my fork so that it's safe

* double date getting more initialized

no animations, one block, nothing actually functions. but the boy is put in place, and the girl is almost put in place! just wanted to merge this with the main branch to play catchy tune

* initialization done!!!!!

gonna fix up the code, see what i can take out, see what i can standardize, see what i need to add. loving this so far, even with all of its annoyances

* ughhhh animation stuff.

this is gonna take me a day or two to even comprehend

* starting on animation

committing cause im traveling, i might work on this if i have time

* replace sounds, extend some stuff

replaced the rhre3 sounds and added a few things to make camera movements not look so out-of-bounds janky. still working on it, but it's coming along good so far

* starting on dog ninja

waiting for bread2unity to get merged, and i'm still probably gonna keep working on dog ninja until it's done even if it does.

* initialization and sprite trimming done

reference is from angrytapper2's video

Throw Object,
Cut Everything!, and
Here We Go!

were the cues added, in that order.

* temp icon w/ mask + bezier curves!!

the icon is temporary, but i did add a mask. i think it looks pretty good :) especially for  what it is. also bezier curves. i just figured those out, now i just need to figure out how to implement them into the object.

* getting there

i'm so close to getting the "Cut Everything!" block to work. i'm trying to figure out how to not play it as the default when the game is rendered

* added sfx
* added bird animations
* looked at double date for like 2 minutes
* have been editing blue bear's "treat" block to fit dog ninja for a while now

(im gonna try doing these commit notes from now on)

* keeping trying

* cues have sfx now
 - the "throw object" cues are not accurate yet
* animations adjusted to not keep bird on screen

* not much progress rn, getting into the harder stuff

* added more sfx
 - it's from rhre3, if somebody can find a clean rip that would be great, cause i can't)
* made a bop animation
 - still trying to figure out how to get it to play every beat :/
* replaced throw sfx, was using whiff sfx before
* extended background using a slice of the sky gradient and color picked blocks
* some code added to dogninja.cs and throwobject.cs is... bad. it's just torn from other games.

* i need to work out conflicts

really this is just pushing all my stuff so i don't lose it, tambourine is giving my fork conflicts for some reason 💀

* blehhh

figuring out git some more

* doesn't look like much. but

I GOT ANIMATIONS WORKING.
(god, i suck at C#)

* bop animations, on every beat (will soon make it a toggle)
* bird fly in and out, flies in when not on screen and out when on screen
* did more work on "throwObject.cs" but not anything applicable yet
* also found out how assigning scripts to a prefab works. ugh. so, got all those holders and objects assigned

* trying to get different sfx working for each item

really i just established some structure code. i don't understand it too well, so there are a few things commented out.

* starting with inputs

rn they're broken and i can't tell why :(

* heavily commented out code in ThrowObject.cs
* added option to disable the bird's FlyIn SFX
* some debug stuff
* some scheduled inputs (that AREN'T. WORKING.)

* fixed the input bug

tysm ymf <333 ur my hero
technically this is a functioning game! gonna get different sfx/sprites working, try to get bezier curves working, then i'll make a pr

* fixed that input bug
* changed some variable names
* getting some more infrastructure for getting the game fully working

* double date stuff!!!! (improvements, playability)

* purged SO much code
* combined SoccerBall.cs and Basketball.cs into Ball.cs
 - might do that for Football.cs too, but we'll see
* removed bop animation, it looked bad and made double date as a whole look bad cause it didn't reset. so the boy looked a bit off.
 - also fixed an error pertaining to animations
* basic input stuff for when bread2unity gets merged
* oh so much infrastructure stuff

* lol commit

* some animation stuff

* sfx stuff

all the different options have sfx tied to them for the throw and slice. now onto sprites and animation...

* added tacobell too :)

* dog ninja going into WIP :D

(commiting rn cause i wanna do some experimental animation)

* one more object :)
* optimized some code
* new sprites are almost done; i've got a list of both the sprites and their halves.

* sprites are in! and goodnight.

UGHHH BEZIER CURVES I DONT UNDERSTAND YOU

* all the sprites go with their corresponding option and sfx
* bird improved slightly

* BEZIER CURVES

* actual fruit animation
* toggle for random fruits (doesn't work yet)
* textbox for custom objects (doesn't work yet)
 - not user-submitted stuff, just stuff that doesn't really fit in the main dropdown menu
* some stuff i don't remember, but it's definitely stuff that's working towards making everything work.

miss anims don't work yet. at all. the objects just go flying. also the slice animation needs to be finished for both sides, and a bool needs to be added for which side to play (will be easy to do) also when you randomly slice, which is determined completely randomly (thank god)

gura-nyuuu :3 (i'm sorry)
* added a single sfx

* custom objects!!

tbh a lot more's coming but i need to merge my stuff
i don't feel like taking notes here

* working on halves

* misc cleaning up stuff
* started on the logic for halves

* progress on halves, cleaning out variables

i need to sync between laptop and pc

* im pretty sure that's all the double date stuff taken out

👍

* neatened up code + better bezier curves

* adjusted bezier curves
 - sooo close to perfection but very noticeable stuttering at lower speeds
* changed random to default object option instead of a bool; makes more sense this way
* renaming things, getting code ready for new animations
* commented a bunch of my code
* re-fixing a bunch of stuff that has since broken from updating stuff
 - i.e random fruit, sprites, "here we go!" in general, etc.

* new font, stuff fixed

* added [about friend font](https://www.deviantart.com/matthewtheprep/art/About-Friend-Extended-Now-with-Greek-and-Cyrillic-832264925)
* fixed "here we go!"
* some more left or right object animation stuff

* so many things

* fully added custom items
 - accessible through a cheat code type system in the drop-down for cues
* changed how the bezier curves function
 - only three points now (much smoother) and i just start it much later on the curve
* added AboutFriend font, basically kurokane except free to use
* started more on halves

god, halves are gonna be hard tho

* quick commit

by [d]

* got temp animations in

* temp animations for ev
* replaced ai sprites with ev's (thank you <333)
* getting progress on halves
* cleaned up files

* hi res sprites

* throw both objects + prepare anim

title

though, i still need to work out how the prepare animation will not play when you need to slice (cues a beat or less apart)

* all dog ninja animations

* forgot some stuff lol

* prep anim done

yay :)

* oops! blend tree moment

(more stuff)

* animation fixes

* more anim fixes lol

* done for the night

* added seanski's new icon
* fixed the sound for both objects getting thrown
* still working on the prepare animation, but for now it's gonna be a block
 - if literally anybody wants to implement an auto-prepare that isn't jank be my guest
* halves progress, as usual
* added a new item 😄

* fix conflicts

just saw these in the pr, this commit should fix them

* clean up code/fix prepare block

thank you ymf!!! <333

* code optimizations

* both slice anim + prepare anim fixed

* i have stashed changes i need to work on

* stashed changes

* remade halves lists
* renamed some sprites
 -i had funny little names like "tater" and "cuc" but that's a bit confusing
* custom halves don't have the framework for them yet so i was building that too

* half sprites work now

onto making the curve an animation!
(also fixing the text ig)
(ALSO i fixed the prepare stuff (i think))

* unity animation 💀

death

* Fixed text stuff

* push changes so nothing breaks

hi ymf

* i'll work on this more later

* halves r workin
* oops! all mp3s!
 -converted mp3 sfx to ogg

still need to do barelies, then everything is done

* barelies are so close to being done!!!

tweaking + figuring out how position works depending on which side the object was thrown

* stopping for the night

barelies are actually so insanely close to being done it's just a little bit of jank that's holding them back

ill finish this tomorrow.

* it's over. it's finally over. PR TIME!

* final adjustments
* the rest of the barely stuff
* clean up the code a little

:D

* halves look a lot better

gonna remove all my enum parsing code and replace it with a boring dropdown 😢

after that i gotta fix the barelies, i should be able to just use whatever the halves are doing cause they look really good

* rewrote basically all of ThrowObject()

* overhauled how object calling works
* added "Idol" object (fan club mic)
* fixed barelies and curves and how they were transformed

* oh and uh, one more thing.

prepare block was janky so i just made the animation last 20 seconds :)
ez fix

* final touch-ups + layering issues

title

* apparently this didn't push

👹

---------

Co-authored-by: minenice55 <star.elementa@gmail.com>
Co-authored-by: patataofcourse <patataofcourse@gmail.com>
Co-authored-by: ev <85412919+evdial@users.noreply.github.com>
Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com>
This commit is contained in:
AstrlJelly 2023-03-11 15:55:18 -05:00 committed by GitHub
parent 06cb09e64f
commit 551599500e
8 changed files with 681 additions and 646 deletions

File diff suppressed because it is too large Load diff

View file

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

@ -27,7 +27,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: 0, y: 0, z: 0}
inSlope: {x: Infinity, y: Infinity, z: Infinity}
outSlope: {x: Infinity, y: Infinity, z: Infinity}
@ -53,7 +53,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: 0, y: -1.12, z: 0}
inSlope: {x: Infinity, y: Infinity, z: Infinity}
outSlope: {x: Infinity, y: Infinity, z: Infinity}
@ -78,7 +78,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: 0, y: -0.07, z: 0}
inSlope: {x: Infinity, y: Infinity, z: Infinity}
outSlope: {x: Infinity, y: Infinity, z: Infinity}
@ -103,7 +103,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: -9.18, y: -2.54, z: 20.748348}
inSlope: {x: Infinity, y: Infinity, z: 0}
outSlope: {x: Infinity, y: Infinity, z: 0}
@ -128,7 +128,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: -1.84, y: -1.93, z: 20.748348}
inSlope: {x: Infinity, y: Infinity, z: 0}
outSlope: {x: Infinity, y: Infinity, z: 0}
@ -153,7 +153,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: -5.5894957, y: -3.1524081, z: 20.748348}
inSlope: {x: Infinity, y: Infinity, z: 0}
outSlope: {x: Infinity, y: Infinity, z: 0}
@ -178,7 +178,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: -5.8489957, y: -3.078408, z: 20.748348}
inSlope: {x: Infinity, y: Infinity, z: 0}
outSlope: {x: Infinity, y: Infinity, z: 0}
@ -203,7 +203,7 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 1
time: 20.166666
value: {x: -5.568996, y: -1.39, z: 20.748348}
inSlope: {x: Infinity, y: Infinity, z: 0}
outSlope: {x: Infinity, y: Infinity, z: 0}
@ -230,7 +230,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
time: 20.166666
value: 2
inSlope: -0
outSlope: 0
@ -249,7 +249,7 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3}
- time: 1
- time: 20.166666
value: {fileID: -7602907453496852081, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3}
attribute: m_Sprite
path: DogBody/DogArmRight
@ -258,7 +258,7 @@ AnimationClip:
- curve:
- time: 0
value: {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3}
- time: 1
- time: 20.166666
value: {fileID: 7849497092207798707, guid: 1c59b9cd0adef0941bc4bd4bde66a759, type: 3}
attribute: m_Sprite
path: DogBody/DogArmLeft
@ -358,7 +358,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1.0333333
m_StopTime: 20.199999
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@ -387,7 +387,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -415,7 +415,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -1.12
inSlope: Infinity
outSlope: Infinity
@ -443,7 +443,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -471,7 +471,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -499,7 +499,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -0.07
inSlope: Infinity
outSlope: Infinity
@ -527,7 +527,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -555,7 +555,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -9.18
inSlope: Infinity
outSlope: Infinity
@ -583,7 +583,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -2.54
inSlope: Infinity
outSlope: Infinity
@ -611,7 +611,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 20.748348
inSlope: 0
outSlope: 0
@ -639,7 +639,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -1.84
inSlope: Infinity
outSlope: Infinity
@ -667,7 +667,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -1.93
inSlope: Infinity
outSlope: Infinity
@ -695,7 +695,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 20.748348
inSlope: 0
outSlope: 0
@ -723,7 +723,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -751,7 +751,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -779,7 +779,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 0
inSlope: Infinity
outSlope: Infinity
@ -807,7 +807,7 @@ AnimationClip:
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
time: 20.166666
value: 2
inSlope: -0
outSlope: 0
@ -835,7 +835,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -5.5894957
inSlope: Infinity
outSlope: Infinity
@ -863,7 +863,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -3.1524081
inSlope: Infinity
outSlope: Infinity
@ -891,7 +891,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 20.748348
inSlope: 0
outSlope: 0
@ -919,7 +919,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -5.8489957
inSlope: Infinity
outSlope: Infinity
@ -947,7 +947,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -3.078408
inSlope: Infinity
outSlope: Infinity
@ -975,7 +975,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 20.748348
inSlope: 0
outSlope: 0
@ -1003,7 +1003,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -5.568996
inSlope: Infinity
outSlope: Infinity
@ -1031,7 +1031,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: -1.39
inSlope: Infinity
outSlope: Infinity
@ -1059,7 +1059,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
time: 20.166666
value: 20.748348
inSlope: 0
outSlope: 0

View file

@ -11,6 +11,15 @@ TextureImporter:
- first:
213: -8501646544172160823
second: AmongUs_Right
- first:
213: 2196219148037962045
second: Idol_Full
- first:
213: -130797512336752496
second: Idol_Left
- first:
213: 8490305602720712907
second: Idol_Right
externalObjects: {}
serializedVersion: 11
mipmaps:
@ -657,6 +666,69 @@ TextureImporter:
indices:
edges: []
weights: []
- serializedVersion: 2
name: Idol_Full
rect:
serializedVersion: 2
x: 153
y: 1781
width: 110
height: 201
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d39b6b7dda98a7e10800000000000000
internalID: 2196219148037962045
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Idol_Left
rect:
serializedVersion: 2
x: 165
y: 1516
width: 103
height: 198
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 090c9a30b505f2ef0800000000000000
internalID: -130797512336752496
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: Idol_Right
rect:
serializedVersion: 2
x: 190
y: 1253
width: 78
height: 199
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: bc84dac46ff93d570800000000000000
internalID: 8490305602720712907
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []

View file

@ -27,49 +27,15 @@ namespace HeavenStudio.Games.Loaders
function = delegate { DogNinja.instance.Prepare(eventCaller.currentEntity.beat); },
defaultLength = 0.5f,
},
/*
new GameAction("ThrowObject", "Throw Object")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, e["type"], e["text"], e["left"], false); },
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, e["direction"], e["typeL"], e["typeR"]); },
defaultLength = 2,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"),
new Param("text", "", "Alt. Objects", "An alternative object; one that doesn't exist in the main menu"),
new Param("left", true, "Throw from left?", "Whether the object should come from the left or right")
}
},
*/
new GameAction("ThrowObjectLeft", "Throw Object Left")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, e["type"], e["text"], true, false); },
defaultLength = 2,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"),
new Param("text", "", "Alt. Objects", "An alternative object; one that doesn't exist in the main menu"),
}
},
new GameAction("ThrowObjectRight", "Throw Object Right")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, e["type"], e["text"], false, false); },
defaultLength = 2,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"),
new Param("text", "", "Alt. Objects", "An alternative object; one that doesn't exist in the main menu"),
}
},
new GameAction("ThrowObjectBoth", "Throw Object Left & Right")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowBothObject(e.beat, e["type"], e["type2"], e["text"], e["text2"]); },
defaultLength = 2,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Left Object", "The object on the left to be thrown"),
new Param("type2", DogNinja.ObjectType.Random, "Right Object", "The object on the right to be thrown"),
new Param("text", "", "Left Alt. Object", "An alternative object on the left; one that doesn't exist in the main menu"),
new Param("text2", "", "Right Alt. Object", "An alternative object on the right; one that doesn't exist in the main menu"),
new Param("direction", DogNinja.ObjectDirection.Left, "Which Side", "Whether the object should come from the left, right, or both sides"),
new Param("typeL", DogNinja.ObjectType.Random, "Left \nObject", "The object to be thrown from the left"),
new Param("typeR", DogNinja.ObjectType.Random, "Right Object", "The object to be thrown from the right"),
}
},
new GameAction("CutEverything", "Cut Everything!")
@ -88,6 +54,39 @@ namespace HeavenStudio.Games.Loaders
defaultLength = 2,
inactiveFunction = delegate { DogNinja.HereWeGoInactive(eventCaller.currentEntity.beat); },
},
// these are still here for backwards-compatibility but are hidden in the editor
new GameAction("ThrowObjectLeft", "Throw Object Left")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, 0, e["type"], 0); },
defaultLength = 2,
hidden = true,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"),
}
},
new GameAction("ThrowObjectRight", "Throw Object Right")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowObject(e.beat, 1, 0, e["type"]); },
defaultLength = 2,
hidden = true,
parameters = new List<Param>()
{
new Param("type", DogNinja.ObjectType.Random, "Object", "The object to be thrown"),
}
},
new GameAction("ThrowObjectBoth", "Throw Object Both")
{
function = delegate { var e = eventCaller.currentEntity; DogNinja.instance.ThrowBothObject(e.beat, e["typeL"], e["typeR"]); },
defaultLength = 2,
hidden = true,
parameters = new List<Param>()
{
new Param("typeL", DogNinja.ObjectType.Random, "Left Object", "The object on the left to be thrown"),
new Param("typeR", DogNinja.ObjectType.Random, "Right Object", "The object on the right to be thrown"),
}
},
});
}
}
@ -117,7 +116,6 @@ namespace HeavenStudio.Games
[SerializeField] BezierCurve3D CurveFromRight;
[SerializeField] Sprite[] ObjectTypes;
[SerializeField] Sprite[] CustomObjects;
private float lastReportedBeat = 0f;
private bool birdOnScreen = false;
@ -128,6 +126,13 @@ namespace HeavenStudio.Games
public static DogNinja instance;
public enum ObjectDirection
{
Left,
Right,
Both,
}
public enum ObjectType
{
Random, // random fruit
@ -140,10 +145,19 @@ namespace HeavenStudio.Games
Bone, // bone
Pan, // pan
Tire, // tire
Custom, // directs to custom stuff
// custom objects that aren't in the og game
AirBatter,
Karateka,
IaiGiriGaiden,
ThumpFarm,
BattingShow,
MeatGrinder,
Idol,
TacoBell,
//YaseiNoIkiG3M4,
}
// input these into the secret object box for custom objects
/*
public enum CustomObject
{
TacoBell,
@ -157,11 +171,11 @@ namespace HeavenStudio.Games
//YaseiNoIkiG3M4,
//AmongUs,
}
*/
private void Awake()
{
instance = this;
cutEverythingCanvas.worldCamera = GameCamera.instance.camera;
}
private void Update()
@ -170,7 +184,7 @@ namespace HeavenStudio.Games
{
DogAnim.DoScaledAnimationAsync("Prepare", 0.5f);
DogAnim.SetBool("needPrepare", true);
};
}
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
{
@ -181,12 +195,12 @@ namespace HeavenStudio.Games
slice = "WhiffRight";
} else {
slice = "WhiffLeft";
};
}
DogAnim.DoScaledAnimationAsync(slice, 0.5f);
Jukebox.PlayOneShotGame("dogNinja/whiff");
DogAnim.SetBool("needPrepare", false);
};
}
}
private void LateUpdate()
@ -194,7 +208,7 @@ namespace HeavenStudio.Games
if (Conductor.instance.ReportBeat(ref lastReportedBeat) && DogAnim.IsAnimationNotPlaying() && !dontBop)
{
DogAnim.DoScaledAnimationAsync("Bop", 0.5f);
};
}
}
public void Bop(float beat, bool bop)
@ -202,42 +216,49 @@ namespace HeavenStudio.Games
dontBop = !bop;
}
public void SetCustomText(string text)
public void ThrowObject(float beat, int direction, int typeL, int typeR)
{
cutEverythingText.text = text;
}
public void ThrowObject(float beat, int ObjType, string textObj, bool fromLeft, bool fromBoth)
{
int ObjSprite = ObjType;
if (ObjType == 10) {
// custom object code, uses the enum to turn the input string into integer to get the sprite
Enum.TryParse(textObj, true, out CustomObject notIntObj);
ObjSprite = (int) notIntObj;
usesCustomObject = true;
WhichObject.sprite = CustomObjects[ObjSprite];
} else if (ObjType == 0) {
int ObjSprite = 1;
if ((typeL == 0 && direction == 0)
|| (typeR == 0 && direction == 1)
|| ((typeL == 0 || typeR == 0) && direction == 2)) {
// random object code. it makes a random number from 1-6 and sets that as the sprite
System.Random rd = new System.Random();
ObjSprite = rd.Next(1, 6);
WhichObject.sprite = ObjectTypes[ObjSprite];
} else { WhichObject.sprite = ObjectTypes[ObjSprite]; };
typeL = ObjSprite;
typeR = ObjSprite;
}
// instantiate a game object and give it its variables
ThrowObject Object = Instantiate(ObjectBase, ObjectHolder).GetComponent<ThrowObject>();
Object.startBeat = beat;
Object.curve = fromLeft ? CurveFromLeft : CurveFromRight;
Object.fromLeft = fromLeft;
Object.fromBoth = fromBoth;
Object.textObj = textObj;
Object.type = ObjType;
Object.spriteInt = (ObjType == 10 ? ObjSprite + 10 : ObjSprite);
if (direction == 0 || direction == 2) {
WhichObject.sprite = ObjectTypes[typeL];
ThrowObject ObjectL = Instantiate(ObjectBase, ObjectHolder).GetComponent<ThrowObject>();
ObjectL.startBeat = beat;
ObjectL.curve = CurveFromLeft;
ObjectL.fromLeft = true;
ObjectL.direction = direction;
ObjectL.type = typeL;
ObjectL.textObj = Enum.GetName(typeof(ObjectType), typeL);
}
if (direction == 1 || direction == 2) {
WhichObject.sprite = ObjectTypes[typeR];
ThrowObject ObjectR = Instantiate(ObjectBase, ObjectHolder).GetComponent<ThrowObject>();
ObjectR.startBeat = beat;
ObjectR.curve = CurveFromRight;
ObjectR.fromLeft = false;
ObjectR.direction = direction;
ObjectR.type = typeR;
ObjectR.textObj = Enum.GetName(typeof(ObjectType), typeR);
}
}
public void ThrowBothObject(float beat, int ObjType1, int ObjType2, string textObj1, string textObj2)
// only here for backwards compatibility
public void ThrowBothObject(float beat, int ObjType1, int ObjType2)
{
ThrowObject(beat, ObjType1, textObj1, false, true);
ThrowObject(beat, ObjType2, textObj2, true, true);
ThrowObject(beat, 0, ObjType1, 0);
ThrowObject(beat, 1, 0, ObjType2);
}
public void CutEverything(float beat, bool sound, string customText)
@ -250,11 +271,11 @@ namespace HeavenStudio.Games
}
BirdAnim.Play("FlyIn", 0, 0);
birdOnScreen = true;
SetCustomText(customText);
cutEverythingText.text = customText;
} else {
BirdAnim.Play("FlyOut", 0, 0);
birdOnScreen = false;
};
}
}
public void Prepare(float beat)

View file

@ -41,8 +41,8 @@ namespace HeavenStudio.Games.Scripts_DogNinja
private void Update()
{
float flyPosHalves = Conductor.instance.GetPositionFromBeat(songPos, 1f)+1f;
flyPosHalves *= 0.25f;
float flyPosHalves = (Conductor.instance.GetPositionFromBeat(songPos, 3f)*(Conductor.instance.GetPositionFromBeat(songPos, 3f)))+Conductor.instance.GetPositionFromBeat(songPos, 1f);
flyPosHalves = (flyPosHalves*0.2f)+0.34f;
transform.position = curve.GetPoint(flyPosHalves)+objPos;
float rot = rotSpeed;

View file

@ -12,10 +12,11 @@ namespace HeavenStudio.Games.Scripts_DogNinja
{
public float startBeat;
public int type;
public int spriteInt;
public string textObj;
public bool fromLeft;
public bool fromBoth = false;
public bool fromRight;
public int direction;
private Vector3 objPos;
private bool isActive = true;
private float barelyTime;
@ -47,25 +48,9 @@ namespace HeavenStudio.Games.Scripts_DogNinja
{
barelyCurve = fromLeft ? BarelyRightCurve : BarelyLeftCurve;
switch (type) {
case 7:
sfxNum += "bone";
break;
case 8:
sfxNum += "pan";
break;
case 9:
sfxNum += "tire";
break;
case 10:
sfxNum += textObj;
break;
default:
sfxNum += "fruit";
break;
};
sfxNum += type < 7 ? "fruit" : textObj;
if (fromLeft && fromBoth) {} else { Jukebox.PlayOneShotGame(sfxNum+"1"); }
if (direction == 2 && fromLeft) {} else { Jukebox.PlayOneShotGame(sfxNum+"1"); }
game.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN, Hit, Miss, Out);
@ -83,39 +68,39 @@ namespace HeavenStudio.Games.Scripts_DogNinja
// destroy object when it's off-screen
if (flyPos > 1f) {
GameObject.Destroy(gameObject);
};
}
} else {
flyPosBarely *= 0.3f;
transform.position = barelyCurve.GetPoint(flyPosBarely) + (objPos/3);
transform.position = barelyCurve.GetPoint(flyPosBarely) + objPos;
float rot = fromLeft ? 200f : -200f;
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (rot * Time.deltaTime));
if (flyPosBarely > 1f) {
GameObject.Destroy(gameObject);
};
}
}
if ((!Conductor.instance.isPlaying && !Conductor.instance.isPaused)
|| GameManager.instance.currentGame != "dogNinja") {
GameObject.Destroy(gameObject);
};
}
}
private void SuccessSlice()
{
string Slice = "Slice";
if (!fromBoth && fromLeft) {
if (direction == 0) {
Slice += "Left";
} else if (!fromBoth && !fromLeft) {
} else if (direction == 1) {
Slice += "Right";
} else {
Slice += "Both";
};
}
DogAnim.DoScaledAnimationAsync(Slice, 0.5f);
if (fromLeft && fromBoth) {} else { Jukebox.PlayOneShotGame(sfxNum+"2"); }
if (!(direction == 2 && fromLeft)) Jukebox.PlayOneShotGame(sfxNum+"2");
game.WhichLeftHalf.sprite = objectLeftHalves[spriteInt-1];
game.WhichRightHalf.sprite = objectRightHalves[spriteInt-1];
game.WhichLeftHalf.sprite = objectLeftHalves[type-1];
game.WhichRightHalf.sprite = objectRightHalves[type-1];
SpawnHalves LeftHalf = Instantiate(HalvesLeftBase).GetComponent<SpawnHalves>();
LeftHalf.startBeat = startBeat;
@ -132,27 +117,20 @@ namespace HeavenStudio.Games.Scripts_DogNinja
private void JustSlice()
{
Debug.Log("brake point before small");
isActive = false;
barelyTime = Conductor.instance.songPositionInBeats;
Debug.Log("brake point middle 1 small");
string Barely = "Barely";
if (!fromBoth && fromLeft) {
if (direction == 0) {
Barely += "Left";
} else if (!fromBoth && !fromLeft) {
} else if (direction == 1) {
Barely += "Right";
} else {
Barely += "Both";
};
Debug.Log("brake point middle 2 small");
}
DogAnim.DoScaledAnimationAsync(Barely, 0.5f);
Jukebox.PlayOneShotGame("dogNinja/barely");
Debug.Log("brake point end small");
}
private void Hit(PlayerActionEvent caller, float state)