custom shakes almost fully implemented

missing "miss" stuff but ok on autoplay
This commit is contained in:
Mytiaoga 2024-02-13 19:26:48 +08:00
parent 2b4850104a
commit ead3f3c7f6
5 changed files with 172 additions and 1375 deletions

File diff suppressed because one or more lines are too long

View file

@ -652,6 +652,7 @@ MonoBehaviour:
bopRight: 0 bopRight: 0
isHoldingWhiff: 0 isHoldingWhiff: 0
canCallForFlask: 1 canCallForFlask: 1
counter: 0
clouds: {fileID: 1922318453852840058} clouds: {fileID: 1922318453852840058}
cloudSpeed: 0.06 cloudSpeed: 0.06
cloudDistance: 30 cloudDistance: 30

View file

@ -1,8 +1,8 @@
using System; using System;
public static class AppInfo { public static class AppInfo {
public const string Version = "1.0.9"; public const string Version = "1.0.10";
public static readonly DateTime Date = new DateTime(2024, 02, 13, 04, 48, 05, 124, DateTimeKind.Utc); public static readonly DateTime Date = new DateTime(2024, 02, 13, 11, 14, 29, 110, DateTimeKind.Utc);
} }

View file

@ -28,6 +28,64 @@ namespace HeavenStudio.Games.Loaders
} }
}, },
new GameAction("beat intervals", "Start Interval")
{
preFunction = delegate { LoveLab.PreInterval(e.currentEntity.beat, e.currentEntity.length, e.currentEntity["auto"]); },
parameters = new List<Param>()
{
new Param("auto", true, "Auto Pass Turn", "Toggle if the turn should be passed automatically at the end of the start interval.")
},
preFunctionLength = .9f,
defaultLength = 4f,
resizable = true,
priority = 2,
},
new GameAction("boy shakes", "Boy Shakes")
{
parameters = new List<Param>()
{
new Param("speed", LoveLab.throwFlaskSpeedType.fastFlask, "Flask Speed", "How fast should the boy throw the flasks to the girl?")
},
defaultLength = .5f,
resizable = true,
priority = 1
},
new GameAction("1Heart", "1 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.oneHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("1HeartOffbeat", "1 Heart Offbeat")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.oneOffHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("2Heart", "2 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.twoHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("3Heart", "3 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.threeHeart); },
preFunctionLength = 1f,
defaultLength = 10f
},
new GameAction("5Heart", "5 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.fiveHeart); },
preFunctionLength = 1f,
defaultLength = 10f
},
new GameAction("boxGuy", "Box Guy") new GameAction("boxGuy", "Box Guy")
{ {
function = delegate { LoveLab.instance.mainBoxGuy(e.currentEntity.beat, e.currentEntity["type"]); }, function = delegate { LoveLab.instance.mainBoxGuy(e.currentEntity.beat, e.currentEntity["type"]); },
@ -77,63 +135,6 @@ namespace HeavenStudio.Games.Loaders
new Param("posType", LoveLab.spotlightPos.boy, "Spotlight Position", "(For cone) under the Boy or the Girl?") new Param("posType", LoveLab.spotlightPos.boy, "Spotlight Position", "(For cone) under the Boy or the Girl?")
}, },
priority = 1 priority = 1
},
new GameAction("beat intervals", "Start Interval")
{
function = delegate { LoveLab.PreInterval(e.currentEntity.beat, e.currentEntity.length, e.currentEntity["auto"]); },
parameters = new List<Param>()
{
new Param("auto", true, "Auto Pass Turn", "Toggle if the turn should be passed automatically at the end of the start interval.")
},
defaultLength = 4f,
resizable = true,
priority = 2,
},
new GameAction("boy shakes", "Boy Shakes")
{
parameters = new List<Param>()
{
new Param("speed", LoveLab.throwFlaskSpeedType.fastFlask, "Flask Speed", "How fast should the boy throw the flasks to the girl?")
},
defaultLength = .5f,
resizable = true,
priority = 1
},
new GameAction("1Heart", "1 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.oneHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("1HeartOffbeat", "1 Heart Offbeat")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.oneOffHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("2Heart", "2 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.twoHeart); },
preFunctionLength = 1f,
defaultLength = 4f
},
new GameAction("3Heart", "3 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.threeHeart); },
preFunctionLength = 1f,
defaultLength = 10f
},
new GameAction("5Heart", "5 Heart")
{
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.fiveHeart); },
preFunctionLength = 1f,
defaultLength = 10f
} }
} }
//new List<string>() { "ntr", "normal" }, //new List<string>() { "ntr", "normal" },
@ -214,7 +215,9 @@ namespace HeavenStudio.Games
bool isDay = false; bool isDay = false;
bool hasStartedInterval; bool hasStartedInterval;
bool isHolding; bool isHolding;
int counter; public int counter = 0;
bool isLong = false;
int isLongCount = 0;
[Header("Clouds")] [Header("Clouds")]
@ -342,6 +345,11 @@ namespace HeavenStudio.Games
{ {
List<RiqEntity> reqShakeEvents = GetAllSpeaksInBetweenBeat(beat, beat + interval); List<RiqEntity> reqShakeEvents = GetAllSpeaksInBetweenBeat(beat, beat + interval);
reqShakeEvents.Sort((x, y) => x.beat.CompareTo(y.beat)); reqShakeEvents.Sort((x, y) => x.beat.CompareTo(y.beat));
spawnCustomFlask(reqShakeEvents[0].beat);
this.counter = reqShakeEvents.Count;
List<BeatAction.Action> queuedFlasks = new() List<BeatAction.Action> queuedFlasks = new()
{ {
new BeatAction.Action(beat, delegate new BeatAction.Action(beat, delegate
@ -411,7 +419,7 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("loveLab/LeftCatch", beat, forcePlay: true); SoundByte.PlayOneShotGame("loveLab/LeftCatch", beat, forcePlay: true);
labGuyArm.GetComponent<Animator>().Play("GrabFlask"); labGuyArm.GetComponent<Animator>().Play("GrabFlask");
hasStartedInterval = true; hasStartedInterval = true;
spawnCustomFlask(beat); //spawnCustomFlask(beat);
} }
else if(beat > firstBeatOfInterval) else if(beat > firstBeatOfInterval)
{ {
@ -442,37 +450,46 @@ namespace HeavenStudio.Games
{ {
var inputs = GetAllSpeaksInBetweenBeat(intervalBeat, endBeat); var inputs = GetAllSpeaksInBetweenBeat(intervalBeat, endBeat);
inputs.Sort((x, y) => x.beat.CompareTo(y.beat)); inputs.Sort((x, y) => x.beat.CompareTo(y.beat));
this.counter = counter;
float addDelay = 0f;
inputs[0]["speed"] = inputs[inputs.Count - 1]["speed"];
//debug stuff
//Debug.LogWarning("Beat: " + beat);
//Debug.LogWarning("Length: " + (beat + length));
//Debug.LogWarning("First Beat: " + intervalBeat);
//Debug.LogWarning("Last Beat: " + endBeat);
//Debug.LogWarning("Speed Type: " + speedType);
if (inputs[0]["speed"] == 0)
{
addDelay = 0f;
}
else if(inputs[0]["speed"] == 2)
{
addDelay = .5f;
}
else
{
addDelay = 1f;
}
for (int i = 0; i < inputs.Count; i++) for (int i = 0; i < inputs.Count; i++)
{ {
var input = inputs[i]; var input = inputs[i];
double relativeBeat = input.beat - intervalBeat; double relativeBeat = input.beat - intervalBeat;
double testBeat = (input.beat + input.length) - intervalBeat; double testBeat = (input.beat + input.length) - intervalBeat;
if(i == 0)
{
inputs[0]["speed"] = inputs[inputs.Count - 1]["speed"];
if(inputs[i]["speed"] == 0) ScheduleInput(beat, (length + relativeBeat) + addDelay, InputAction_Nrm, onCatch, onMiss, onEmpty);
{
ScheduleInput(beat, length + relativeBeat, InputAction_Nrm, onCatch, onMiss, onEmpty);
}
else
{
ScheduleInput(beat, (length + relativeBeat) + 1f, InputAction_Nrm, onCatch, onMiss, onEmpty);
}
}
else
{
ScheduleInput(beat, length + relativeBeat, InputAction_Nrm, onCatch, onMiss, onEmpty);
}
if ((inputs[i].beat + inputs[i].length) == endBeat) if ((inputs[i].beat + inputs[i].length) >= endBeat)
{ {
ScheduleInput(beat, (length + testBeat), InputAction_DPad, onRelease, onMiss, onEmpty); ScheduleInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onRelease, onMiss, onEmpty);
} }
else else
{ {
ScheduleAutoplayInput(beat, (length + testBeat), InputAction_DPad, onUpAuto, onMiss, onEmpty); ScheduleAutoplayInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onUpAuto, onMiss, onEmpty);
} }
} }
@ -524,6 +541,12 @@ namespace HeavenStudio.Games
instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace"); instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace");
SoundByte.PlayOneShotGame("loveLab/rightThrowNoShake"); SoundByte.PlayOneShotGame("loveLab/rightThrowNoShake");
instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ThrowFlask"); instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ThrowFlask");
instance.isHolding = false;
instance.hasStartedInterval = false;
instance.spawnFlaskForWeird((caller.startBeat + caller.timer));
var lastCounter = instance.counter;
BeatAction.New(instance, new List<BeatAction.Action>() BeatAction.New(instance, new List<BeatAction.Action>()
{ {
@ -532,11 +555,47 @@ namespace HeavenStudio.Games
instance.labGirlHead.Play("GirlIdleFace"); instance.labGirlHead.Play("GirlIdleFace");
if (instance.labGirlArm.GetComponent<Animator>().IsAnimationNotPlaying()) if (instance.labGirlArm.GetComponent<Animator>().IsAnimationNotPlaying())
{ {
instance.labGirlArm.GetComponent<Animator>().Play("ArmIdle"); instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ArmIdle");
}
SoundByte.PlayOneShotGame("loveLab/heartsCombine");
}),
});
var additionalHearts = 0.063f;
for (int x = 0; x < lastCounter; x++)
{
//Debug.LogWarning("Add: " + (2.75f + (additionalHearts * (x))));
//Debug.LogWarning("Pitch: " + (1f + (pitchHearts * (x))));
//Debug.LogWarning("x: " + x);
var a = x;
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action((caller.startBeat + caller.timer) + (2.25f + (additionalHearts * a)), delegate
{
if(lastCounter == 1)
{
SoundByte.PlayOneShotGame("loveLab/bagHeartLast");
instance.heartBox.GetComponent<Animator>().DoScaledAnimationAsync("HeartBoxSquish");
}
else
{
instance.bagHeartSound(a);
} }
}) })
}); });
} }
}
public void bagHeartSound(int x)
{
var pitchHearts = 0.14f;
SoundByte.PlayOneShotGame("loveLab/bagHeart", pitch: (1f + (pitchHearts * (x))));
instance.heartBox.GetComponent<Animator>().DoScaledAnimationAsync("HeartBoxSquish");
}
public void onDownFlaskCustom() public void onDownFlaskCustom()
{ {
@ -588,11 +647,7 @@ namespace HeavenStudio.Games
*/ */
/* /*
* lovelabflask script * hearts
* ask for how many flask
*
*
* for catchFunctions
*/ */
/* generic's girl blush logic /* generic's girl blush logic
@ -615,6 +670,11 @@ namespace HeavenStudio.Games
* *
*/ */
/*
* clouds
* make a function to make them still
*/
[SerializeField] SuperCurveObject.Path[] flaskBouncePath; [SerializeField] SuperCurveObject.Path[] flaskBouncePath;
public void spotlight(bool active, int whichType, int whichPos) public void spotlight(bool active, int whichType, int whichPos)
@ -725,20 +785,20 @@ namespace HeavenStudio.Games
defaultShaders(); defaultShaders();
//try try
//{ {
// RiqEntity obj2 = prevEntities.FindLast(c => c.beat <= beat && c.datamodel == "loveLab/bop"); RiqEntity obj2 = prevEntities.FindLast(c => c.beat <= beat && c.datamodel == "loveLab/bop");
// if (obj2 != null) if (obj2 != null)
// { {
// Bop(obj2.beat, obj2.length, obj2["toggle"], obj2["toggle2"]); Bop(obj2.beat, obj2.length, obj2["toggle"], obj2["toggle2"]);
// } }
// else else
// { {
// Bop(0, 0, false, false); Bop(0, 0, false, false);
// } }
//} }
//catch { } catch { }
} }

View file

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 1.0.9 bundleVersion: 1.0.10
preloadedAssets: preloadedAssets:
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3} - {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
metroInputSource: 0 metroInputSource: 0
@ -158,11 +158,11 @@ PlayerSettings:
applicationIdentifier: applicationIdentifier:
Standalone: com.RHeavenStudio.Heaven-Studio Standalone: com.RHeavenStudio.Heaven-Studio
buildNumber: buildNumber:
Standalone: 100009 Standalone: 100010
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 100009 AndroidBundleVersionCode: 100010
AndroidMinSdkVersion: 22 AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1