a frogge bip

This commit is contained in:
ThePurpleAnon 2024-04-25 21:37:04 -05:00
parent 3cab5d3d32
commit f712d1bd89
8 changed files with 224 additions and 36 deletions

View file

@ -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

View file

@ -237,3 +237,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
FrogAnim: {fileID: 626886743113828963}
SpriteParts:
- {fileID: 4338800780392838371}
- {fileID: 406877900976759553}

View file

@ -322,3 +322,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
FrogAnim: {fileID: 1884999672794132025}
SpriteParts:
- {fileID: 4338800780392838371}
- {fileID: 406877900976759553}
- {fileID: 4128693103407085196}

View file

@ -322,3 +322,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
FrogAnim: {fileID: 6299897575248826339}
SpriteParts:
- {fileID: 5007591078639621851}
- {fileID: 4042941232235986953}
- {fileID: 1307665614508407357}

View file

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

@ -60,9 +60,13 @@ namespace HeavenStudio.Games.Loaders
function = delegate {
var e = eventCaller.currentEntity;
if (eventCaller.gameManager.minigameObj.TryGetComponent(out FrogHop instance)) {
instance.TwoHop(e.beat);
instance.TwoHop(e.beat, e["spotlights"]);
}
},
parameters = new List<Param>()
{
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<Param>()
{
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<Param>()
{
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<Param>()
{
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<Param>()
{
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<ntrFrog> OtherFrogs = new List<ntrFrog>();
[SerializeField] public ntrFrog LeaderFrog;
[SerializeField] public ntrFrog SingerFrog;
public List<ntrFrog> AllFrogs = new();
public List<ntrFrog> FrontFrogs = new();
public List<ntrFrog> BackFrogs = new();
public List<ntrFrog> whoToInputKTB = new();
[SerializeField] public GameObject Darkness;
[SerializeField] public GameObject SpotlightFront;
[SerializeField] public GameObject SpotlightBack;
List<ntrFrog> AllFrogs = new();
List<ntrFrog> FrontFrogs = new();
List<ntrFrog> BackFrogs = new();
List<ntrFrog> whoToInputKTB = new();
public int globalAnimSide = -1;
int globalAnimSide = -1;
public double wantHop = double.MinValue;
public List<double> 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<double> 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<BeatAction.Action>();
var sounds = new List<MultiSound.Sound>();
//call
actions.Add(new(beat + 0.0, delegate { NPCHop(FrontFrogs); Talk(new List<ntrFrog>() { LeaderFrog }, "Wide", beat); }));
actions.Add(new(beat + 0.5, delegate { NPCHop(FrontFrogs, true); Talk(new List<ntrFrog>() { LeaderFrog }, "Narrow", beat + 1.0); }));
actions.Add(new(beat + 0.5, delegate { NPCHop(FrontFrogs, true); Talk(new List<ntrFrog>() { 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<BeatAction.Action>();
var sounds = new List<MultiSound.Sound>();
@ -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<BeatAction.Action>();
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<ntrFrog> 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<ntrFrog>() { SingerFrog }; //TO DO: make this customizeable
var FrogsToTalk = new List<ntrFrog>();
if (blue) FrogsToTalk.Add(SingerFrog);
if (orange) FrogsToTalk.Add(LeaderFrog);
if (greens) FrogsToTalk.AddRange(BackFrogs);
Talk(FrogsToTalk, syllable, animEnd);
}

View file

@ -13,6 +13,7 @@ namespace HeavenStudio.Games.Scripts_FrogHop
#region Definitions
[SerializeField] public Animator FrogAnim;
[SerializeField] public List<SpriteRenderer> 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
}
}