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,64 +28,14 @@ namespace HeavenStudio.Games.Loaders
} }
}, },
new GameAction("boxGuy", "Box Guy")
{
function = delegate { LoveLab.instance.mainBoxGuy(e.currentEntity.beat, e.currentEntity["type"]); },
defaultLength = 2f,
parameters = new List<Param>()
{
new Param("type", LoveLab.boxGuyAction.takeAway, "Action", "Box Guy's Actions")
}
},
new GameAction("set object colors", "Object Colors")
{
function = delegate {
LoveLab.instance.UpdateMaterialColor(e.currentEntity["colorA"], e.currentEntity["colorB"], e.currentEntity["colorC"]);
},
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("colorA", new Color(0.02909997f, 0.4054601f, 0.97f), "1st Flask Color", "1st Flask Color to show"),
new Param("colorB", new Color(0.81f, 0.2984211f, 0f), "2nd Flask Color", "2nd Flask Color to show"),
new Param("colorC", new Color(0.8313726f, 0.2039216f, 0.5058824f), "3rd Flask Color", "3rd Flask Color to show")
},
priority = 2
},
new GameAction("set time of day", "Time of Day")
{
function = delegate
{
LoveLab.instance.setTimeOfDay(e.currentEntity["type"]);
},
defaultLength = .5f,
parameters = new List<Param>()
{
new Param("type", LoveLab.timeOfDay.sunset, "Time", "Set the time of day")
}
},
new GameAction("spotlight", "Spotlight")
{
function = delegate { LoveLab.instance.spotlight(e.currentEntity["toggle"], e.currentEntity["spotType"], e.currentEntity["posType"]); },
defaultLength = .5f,
parameters = new List<Param>()
{
new Param("toggle", false, "Spotlight", "Activate Spotlight?"),
new Param("spotType", LoveLab.spotlightType.normal, "Spotlight Type", "Normal or Coned?"),
new Param("posType", LoveLab.spotlightPos.boy, "Spotlight Position", "(For cone) under the Boy or the Girl?")
},
priority = 1
},
new GameAction("beat intervals", "Start Interval") new GameAction("beat intervals", "Start Interval")
{ {
function = delegate { LoveLab.PreInterval(e.currentEntity.beat, e.currentEntity.length, e.currentEntity["auto"]); }, preFunction = delegate { LoveLab.PreInterval(e.currentEntity.beat, e.currentEntity.length, e.currentEntity["auto"]); },
parameters = new List<Param>() 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.") 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, defaultLength = 4f,
resizable = true, resizable = true,
priority = 2, priority = 2,
@ -134,6 +84,57 @@ namespace HeavenStudio.Games.Loaders
preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.fiveHeart); }, preFunction = delegate { LoveLab.queueFlask(e.currentEntity.beat, LoveLab.flaskHeart.fiveHeart); },
preFunctionLength = 1f, preFunctionLength = 1f,
defaultLength = 10f defaultLength = 10f
},
new GameAction("boxGuy", "Box Guy")
{
function = delegate { LoveLab.instance.mainBoxGuy(e.currentEntity.beat, e.currentEntity["type"]); },
defaultLength = 2f,
parameters = new List<Param>()
{
new Param("type", LoveLab.boxGuyAction.takeAway, "Action", "Box Guy's Actions")
}
},
new GameAction("set object colors", "Object Colors")
{
function = delegate {
LoveLab.instance.UpdateMaterialColor(e.currentEntity["colorA"], e.currentEntity["colorB"], e.currentEntity["colorC"]);
},
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("colorA", new Color(0.02909997f, 0.4054601f, 0.97f), "1st Flask Color", "1st Flask Color to show"),
new Param("colorB", new Color(0.81f, 0.2984211f, 0f), "2nd Flask Color", "2nd Flask Color to show"),
new Param("colorC", new Color(0.8313726f, 0.2039216f, 0.5058824f), "3rd Flask Color", "3rd Flask Color to show")
},
priority = 2
},
new GameAction("set time of day", "Time of Day")
{
function = delegate
{
LoveLab.instance.setTimeOfDay(e.currentEntity["type"]);
},
defaultLength = .5f,
parameters = new List<Param>()
{
new Param("type", LoveLab.timeOfDay.sunset, "Time", "Set the time of day")
}
},
new GameAction("spotlight", "Spotlight")
{
function = delegate { LoveLab.instance.spotlight(e.currentEntity["toggle"], e.currentEntity["spotType"], e.currentEntity["posType"]); },
defaultLength = .5f,
parameters = new List<Param>()
{
new Param("toggle", false, "Spotlight", "Activate Spotlight?"),
new Param("spotType", LoveLab.spotlightType.normal, "Spotlight Type", "Normal or Coned?"),
new Param("posType", LoveLab.spotlightPos.boy, "Spotlight Position", "(For cone) under the Boy or the Girl?")
},
priority = 1
} }
} }
//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,12 +345,17 @@ 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
{ {
//initial shakes //initial shakes
if (autoPassTurn) if (autoPassTurn)
{ {
//pass to girl //pass to girl
@ -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); if ((inputs[i].beat + inputs[i].length) >= endBeat)
} {
else ScheduleInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onRelease, onMiss, onEmpty);
{
ScheduleInput(beat, (length + relativeBeat) + 1f, InputAction_Nrm, onCatch, onMiss, onEmpty);
}
} }
else else
{ {
ScheduleInput(beat, length + relativeBeat, InputAction_Nrm, onCatch, onMiss, onEmpty); ScheduleAutoplayInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onUpAuto, onMiss, onEmpty);
}
if ((inputs[i].beat + inputs[i].length) == endBeat)
{
ScheduleInput(beat, (length + testBeat), InputAction_DPad, onRelease, onMiss, onEmpty);
}
else
{
ScheduleAutoplayInput(beat, (length + testBeat), 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,10 +555,46 @@ 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