From f712d1bd89bf277c6823de3e17753de9dedbf3f9 Mon Sep 17 00:00:00 2001 From: ThePurpleAnon <100617766+ThePurpleAnon@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:37:04 -0500 Subject: [PATCH] a frogge bip --- Assets/Resources/Games/frogHop.prefab | 102 +++++++++++++-- .../Games/FrogHop/ntrFrogBackup.prefab | 3 + .../Games/FrogHop/ntrFrogLeader.prefab | 4 + .../Games/FrogHop/ntrFrogSinger.prefab | 4 + .../games/frogHop/SE_NTR_FROG_EN_E_BEAT.wav | Bin 0 -> 3884 bytes .../frogHop/SE_NTR_FROG_EN_E_BEAT.wav.meta | 22 ++++ Assets/Scripts/Games/FrogHop/FrogHop.cs | 118 ++++++++++++++---- Assets/Scripts/Games/FrogHop/ntrFrog.cs | 7 ++ 8 files changed, 224 insertions(+), 36 deletions(-) create mode 100644 Assets/Resources/Sfx/games/frogHop/SE_NTR_FROG_EN_E_BEAT.wav create mode 100644 Assets/Resources/Sfx/games/frogHop/SE_NTR_FROG_EN_E_BEAT.wav.meta diff --git a/Assets/Resources/Games/frogHop.prefab b/Assets/Resources/Games/frogHop.prefab index 0922a4baa..9548c99b4 100644 --- a/Assets/Resources/Games/frogHop.prefab +++ b/Assets/Resources/Games/frogHop.prefab @@ -110,7 +110,7 @@ RectTransform: m_GameObject: {fileID: 1957333825293202123} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 60, y: 32, z: 1} + m_LocalScale: {x: 20, y: 11, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 643350981976857931} @@ -161,9 +161,9 @@ SpriteRenderer: m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 - m_SortingOrder: 100 - m_Sprite: {fileID: 1033727535, guid: 3c49c0fa809689d448ee90b3c1143d9f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 0.5019608} + m_SortingOrder: 14 + m_Sprite: {fileID: 7482667652216324306, guid: ef2fa2a75dc283e40b9d4fe1f20dc6fb, type: 3} + m_Color: {r: 0, g: 0, b: 0, a: 0.5019608} m_FlipX: 0 m_FlipY: 0 m_DrawMode: 0 @@ -214,6 +214,7 @@ Transform: - {fileID: 7700878117837970640} - {fileID: 6107407590447943001} - {fileID: 665267706566016202} + - {fileID: 3672416108430647415} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -238,9 +239,9 @@ MonoBehaviour: - {fileID: 2180206873882652162} LeaderFrog: {fileID: 6344731858817934525} SingerFrog: {fileID: 5555782273197061281} - AllFrogs: [] - FrontFrogs: [] - BackFrogs: [] + Darkness: {fileID: 1957333825293202123} + SpotlightFront: {fileID: 8406258651058782659} + SpotlightBack: {fileID: 6260846628814890155} --- !u!1 &3684072535637705111 GameObject: m_ObjectHideFlags: 0 @@ -409,6 +410,89 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!1 &6260846628814890155 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3672416108430647415} + - component: {fileID: 845326127449394562} + m_Layer: 0 + m_Name: SpotlightsBack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &3672416108430647415 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6260846628814890155} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 4.33, z: 0} + m_LocalScale: {x: 0.48, y: 0.48, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 643350981976857931} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!331 &845326127449394562 +SpriteMask: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6260846628814890155} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10758, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 1119035408, guid: 3c49c0fa809689d448ee90b3c1143d9f, type: 3} + m_MaskAlphaCutoff: 0.106 + m_FrontSortingLayerID: 0 + m_BackSortingLayerID: 0 + m_FrontSortingLayer: 0 + m_BackSortingLayer: 0 + m_FrontSortingOrder: 0 + m_BackSortingOrder: 0 + m_IsCustomRangeActive: 0 + m_SpriteSortPoint: 0 --- !u!1 &7294692287861866293 GameObject: m_ObjectHideFlags: 0 @@ -434,7 +518,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7294692287861866293} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1.7069999, z: 0} + m_LocalPosition: {x: 0, y: -1.91, z: 0} m_LocalScale: {x: 0.5, y: 0.5, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -567,7 +651,7 @@ SpriteMask: m_SortingLayer: 0 m_SortingOrder: 0 m_Sprite: {fileID: 1188383036, guid: 3c49c0fa809689d448ee90b3c1143d9f, type: 3} - m_MaskAlphaCutoff: 0.2 + m_MaskAlphaCutoff: 0.106 m_FrontSortingLayerID: 0 m_BackSortingLayerID: 0 m_FrontSortingLayer: 0 diff --git a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogBackup.prefab b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogBackup.prefab index 74bc19296..d6176ebf6 100644 --- a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogBackup.prefab +++ b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogBackup.prefab @@ -237,3 +237,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: FrogAnim: {fileID: 626886743113828963} + SpriteParts: + - {fileID: 4338800780392838371} + - {fileID: 406877900976759553} diff --git a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogLeader.prefab b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogLeader.prefab index c2f3d954e..be8783d4a 100644 --- a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogLeader.prefab +++ b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogLeader.prefab @@ -322,3 +322,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: FrogAnim: {fileID: 1884999672794132025} + SpriteParts: + - {fileID: 4338800780392838371} + - {fileID: 406877900976759553} + - {fileID: 4128693103407085196} diff --git a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogSinger.prefab b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogSinger.prefab index 4b5579b7c..b3973bb1d 100644 --- a/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogSinger.prefab +++ b/Assets/Resources/Prefabs/Games/FrogHop/ntrFrogSinger.prefab @@ -322,3 +322,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: FrogAnim: {fileID: 6299897575248826339} + SpriteParts: + - {fileID: 5007591078639621851} + - {fileID: 4042941232235986953} + - {fileID: 1307665614508407357} diff --git a/Assets/Resources/Sfx/games/frogHop/SE_NTR_FROG_EN_E_BEAT.wav b/Assets/Resources/Sfx/games/frogHop/SE_NTR_FROG_EN_E_BEAT.wav new file mode 100644 index 0000000000000000000000000000000000000000..94a354525a68bd4c037eea112f805beed70f974b GIT binary patch literal 3884 zcmeI#`%@Ly9RTpNd-id6?-PW}OP)6Bv`ItK_^QzfhYT)?04B+_S%%%6gwqR zJ^mj5>(ud{<2}1Zca6?So{@Zuf~hdIXtZdQ8DfS;hDV0^7#|y#H!g2Y&YGN~nMX7I znqM>ejJ{pHyLwB8N`_8&Pk5WCm#Ndkr-zUB9PK&r!-*d%%}Vo2@0Z@Xw7RsJ@=W>M z<8zPcKMH&|b*of!!2`kpq21f=ZA@-VZnavi zZGGGNs{Pge3xNxPo3@)a!)tg8lM0gx_yT^iIoWK`8}ui^lORjX5>N6c`6+k`UZt(l zUPLdVePACbv&yW8%0uOdal~+AH)aJ^xG&xplWobiDzQo&v<=#h$VcS)_WAZ-P=6Nw zEcEa_{J*(>bKRtyyl%d3?$!6|*u-Wl+sc;6C32ms&Nbj1a5`;H8^>~NGD#-C0>1+F zLcOrevCOf+xxgvWxJIs#JT*@(4i|^dgwBMjW7V-jtx(&k@6_YRp#qh0v2n37txUUZ z+%|a3<3rXVYd>`x-9|0A1qVrxcvugcLvqMh=qvPl-u%Q19hNpm~R--60HG#fZxP!ViRag6{m`u;b!ds z{ikX{3w{7T0I$K<-~;yqx8#ysJNcdbuf<=BH<%mD74eFAU%D@SXZy}}Eb&<4Dee^K zl%4Xc^bL9gXaH~FxA6Pa%;cHL z>$r8?XP(bIm*Hi&0dK%vYL_}=c*gKu{jTn$&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}L4SA6ZSNi2G^l=C^428n-QK7-XGf^lP%eb z_swaJX^skKh4ZZKtZf}w2jVk&I6NG#h*m@cdO&}Nd55uVmhGV9pd(36lCQ$6upE`6 z_)OXu-58yv&QedH6DU6Sek}i3?x6lA{!P3LE`z7dr_FfI=29(2i?JW<2W>)|kSS$K zrM6O=6FQ-S6jY*>XwR$9t5rsoaSETpkKtojC)SClsSDf%?h3g=?wWVauol(=RD4%x z2F+k8zmyLM0bv|f!j`aEI19(;ZM)X4y=1;*Dp6gj>() + { + new Param("spotlights", true, "Automatic Spotlights", "Handles spotlight switching automatically."), + }, defaultLength = 4.0f, }, new GameAction("threeshake", "Yeah yeah yeah!") @@ -70,19 +74,45 @@ namespace HeavenStudio.Games.Loaders function = delegate { var e = eventCaller.currentEntity; if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) { - instance.ThreeHop(e.beat); + instance.ThreeHop(e.beat, e["spotlights"]); } }, + parameters = new List() + { + new Param("spotlights", true, "Automatic Spotlights", "Handles spotlight switching automatically."), + }, defaultLength = 4.0f, }, + new GameAction("spotlights", "Spotlights") + { + function = delegate { + var e = eventCaller.currentEntity; + if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) { + instance.Spotlights(e["front"], e["back"], e["dark"]); + } + }, + parameters = new List() + { + new Param("front", true, "Front Lights", "Enables the spotlights on the front frogs."), + new Param("back", false, "Back Lights", "Enables the spotlights on the back frogs."), + new Param("dark", true, "Darken Stage", "Darkens the stage, allowing the spotlights to be seen."), + }, + defaultLength = 0.5f, + }, new GameAction("mouthwide", "Open Mouth (Wide)") { function = delegate { var e = eventCaller.currentEntity; if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) { - instance.Sing(0, "Wide", e.beat + e.length - 0.5); + instance.Sing("Wide", e.beat + e.length - 0.5, e["blue"], e["orange"], e["greens"]); } }, + parameters = new List() + { + new Param("blue", true, "Blue Sings", "Make Blue Frog sing during this event."), + new Param("orange", false, "Orange Sings", "Make Orange Frog sing during this event."), + new Param("greens", false, "Group Sings", "Make the frogs in the back sing during this event."), + }, defaultLength = 0.5f, resizable = true, }, @@ -91,9 +121,15 @@ namespace HeavenStudio.Games.Loaders function = delegate { var e = eventCaller.currentEntity; if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) { - instance.Sing(0, "Narrow", e.beat + e.length - 0.5); + instance.Sing("Narrow", e.beat + e.length - 0.5, e["blue"], e["orange"], e["greens"]); } }, + parameters = new List() + { + new Param("blue", true, "Blue Sings", "Make Blue Frog sing during this event."), + new Param("orange", false, "Orange Sings", "Make Orange Frog sing during this event."), + new Param("greens", false, "Group Sings", "Make the frogs in the back sing during this event."), + }, defaultLength = 0.5f, resizable = true, }, @@ -116,19 +152,22 @@ namespace HeavenStudio.Games [SerializeField] public List OtherFrogs = new List(); [SerializeField] public ntrFrog LeaderFrog; [SerializeField] public ntrFrog SingerFrog; - public List AllFrogs = new(); - public List FrontFrogs = new(); - public List BackFrogs = new(); - public List whoToInputKTB = new(); + [SerializeField] public GameObject Darkness; + [SerializeField] public GameObject SpotlightFront; + [SerializeField] public GameObject SpotlightBack; + List AllFrogs = new(); + List FrontFrogs = new(); + List BackFrogs = new(); + List whoToInputKTB = new(); - public int globalAnimSide = -1; + int globalAnimSide = -1; - public double wantHop = double.MinValue; - public List queuedHops = new(); - public bool keepHopping; - public double startBackHop = double.MinValue; - public double startNoHop = double.MinValue; - public double startRegularHop = double.MinValue; + double wantHop = double.MinValue; + List queuedHops = new(); + bool keepHopping; + double startBackHop = double.MinValue; + double startNoHop = double.MinValue; + double startRegularHop = double.MinValue; public enum WhoBops @@ -264,18 +303,16 @@ namespace HeavenStudio.Games wantHop = beat - 1; } - public void TwoHop (double beat) + public void TwoHop (double beat, bool spotlights) { - startBackHop = beat; - startNoHop = beat + 2; - startRegularHop = beat + 4; + CueCommon(beat, spotlights); var actions = new List(); var sounds = new List(); //call actions.Add(new(beat + 0.0, delegate { NPCHop(FrontFrogs); Talk(new List() { LeaderFrog }, "Wide", beat); })); - actions.Add(new(beat + 0.5, delegate { NPCHop(FrontFrogs, true); Talk(new List() { LeaderFrog }, "Narrow", beat + 1.0); })); + actions.Add(new(beat + 0.5, delegate { NPCHop(FrontFrogs, true); Talk(new List() { LeaderFrog }, "Narrow", beat + 1.5); })); sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_HA", beat)); sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_POP_DEFAULT", beat)); sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_T_HAAI", beat + 0.5)); @@ -283,7 +320,7 @@ namespace HeavenStudio.Games //response actions.Add(new(beat + 2.0, delegate { NPCHop(BackFrogs); Talk(BackFrogs, "Wide", beat); })); - actions.Add(new(beat + 2.5, delegate { NPCHop(BackFrogs, true); Talk(BackFrogs, "Narrow", beat + 3.0); })); + actions.Add(new(beat + 2.5, delegate { NPCHop(BackFrogs, true); Talk(BackFrogs, "Narrow", beat + 3.5); })); sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_HA", beat + 2.0)); sounds.Add(new MultiSound.Sound("frogHop/SE_NTR_FROG_EN_E_HAAI", beat + 2.5)); @@ -295,11 +332,9 @@ namespace HeavenStudio.Games MultiSound.Play(sounds.ToArray()); } - public void ThreeHop (double beat) + public void ThreeHop (double beat, bool spotlights) { - startBackHop = beat; - startNoHop = beat + 2; - startRegularHop = beat + 4; + CueCommon(beat, spotlights); var actions = new List(); var sounds = new List(); @@ -332,6 +367,30 @@ namespace HeavenStudio.Games MultiSound.Play(sounds.ToArray()); } + public void CueCommon(double beat, bool spotlights = true) + { + startBackHop = beat; + startNoHop = beat + 2; + startRegularHop = beat + 4; + + if (!spotlights) return; + + var actions = new List(); + + actions.Add(new(beat + 1.5, delegate { Spotlights(false, true); })); + actions.Add(new(beat + 3.5, delegate { Spotlights(true, false); })); + + BeatAction.New(this, actions); + } + + public void Spotlights(bool front, bool back, bool dark = true) + { + foreach (var a in FrontFrogs) { a.Darken(front || !dark); } + Darkness.SetActive(dark); + SpotlightFront.SetActive(front); + SpotlightBack.SetActive(back); + } + public void NPCHop(List FrogsToHop, bool isThisLong = false) { foreach (var a in FrogsToHop) { if (a != PlayerFrog) a.Hop(isLong: isThisLong); } @@ -389,9 +448,14 @@ namespace HeavenStudio.Games foreach (var a in FrogsToTalk) { a.Talk(syllable, animEnd); } } - public void Sing(int whichFrog, string syllable, double animEnd) + public void Sing(string syllable, double animEnd, bool blue, bool orange, bool greens) { - var FrogsToTalk = new List() { SingerFrog }; //TO DO: make this customizeable + var FrogsToTalk = new List(); + + if (blue) FrogsToTalk.Add(SingerFrog); + if (orange) FrogsToTalk.Add(LeaderFrog); + if (greens) FrogsToTalk.AddRange(BackFrogs); + Talk(FrogsToTalk, syllable, animEnd); } diff --git a/Assets/Scripts/Games/FrogHop/ntrFrog.cs b/Assets/Scripts/Games/FrogHop/ntrFrog.cs index f70a00447..6af128e62 100644 --- a/Assets/Scripts/Games/FrogHop/ntrFrog.cs +++ b/Assets/Scripts/Games/FrogHop/ntrFrog.cs @@ -13,6 +13,7 @@ namespace HeavenStudio.Games.Scripts_FrogHop #region Definitions [SerializeField] public Animator FrogAnim; + [SerializeField] public List SpriteParts = new(); [NonSerialized] public int animSide = -1; [NonSerialized] public float scaleConstant = 1; @@ -64,6 +65,12 @@ namespace HeavenStudio.Games.Scripts_FrogHop else animSide *= -1; } + public void Darken(bool reverse = false) + { + if (!reverse) foreach (var a in SpriteParts) { a.color = new Color(0.5f, 0.5f, 0.5f, 1); } + else foreach (var a in SpriteParts) { a.color = new Color(1, 1, 1, 1); } + } + #endregion } } \ No newline at end of file