bop and auto down fix

This commit is contained in:
Mytiaoga 2024-02-15 14:58:18 +08:00
parent fc1e2e8ecb
commit 2f26d32f0e
12 changed files with 1655 additions and 265 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -636,6 +636,13 @@ MonoBehaviour:
flaskSpriteRend: {fileID: 4957942349382571606} flaskSpriteRend: {fileID: 4957942349382571606}
girlFlaskSpriteRend: {fileID: 4174149414944176317} girlFlaskSpriteRend: {fileID: 4174149414944176317}
weirdFlaskSpriteRend: {fileID: 7917972493379982696} weirdFlaskSpriteRend: {fileID: 7917972493379982696}
flaskArcToBoy:
- GuyFlaskFastIn
- GuyFlaskSlowIn
flaskArcToGirl:
- GirlFastFlaskIn
- GirlSlowFlaskIn
- GirlMidSlowFlaskIn
heartBox: {fileID: 6043310135498338089} heartBox: {fileID: 6043310135498338089}
spotlightShader: {fileID: 5748955415339632706} spotlightShader: {fileID: 5748955415339632706}
spotlightShaderCone: {fileID: 2784226145224311011} spotlightShaderCone: {fileID: 2784226145224311011}
@ -665,7 +672,7 @@ MonoBehaviour:
weirdShader: {fileID: 2100000, guid: 39514fb7dcd08a64bbd28251e98d9a6a, type: 2} weirdShader: {fileID: 2100000, guid: 39514fb7dcd08a64bbd28251e98d9a6a, type: 2}
weirdHeaderShader: {fileID: 5930860602689851574} weirdHeaderShader: {fileID: 5930860602689851574}
flaskBouncePath: flaskBouncePath:
- name: GuyFlaskIn - name: GuyFlaskIn (orig)
preview: 0 preview: 0
anchor: {fileID: 0} anchor: {fileID: 0}
positions: positions:
@ -687,6 +694,50 @@ MonoBehaviour:
values: values:
- key: rot - key: rot
value: 0 value: 0
- name: GuyFlaskFastIn
preview: 1
anchor: {fileID: 0}
positions:
- tag:
pos: {x: -10.5, y: -0.5, z: 0}
target: {fileID: 0}
height: 3.8
duration: 1
useLastRealPos: 0
values:
- key: rot
value: 360
- tag:
pos: {x: -5.1, y: -0.5, z: 0}
target: {fileID: 0}
height: 0
duration: 0
useLastRealPos: 0
values:
- key: rot
value: 0
- name: GuyFlaskSlowIn
preview: 0
anchor: {fileID: 0}
positions:
- tag:
pos: {x: -10.5, y: -0.5, z: 0}
target: {fileID: 0}
height: 5.3
duration: 1
useLastRealPos: 0
values:
- key: rot
value: 360
- tag:
pos: {x: -5.1, y: -0.5, z: 0}
target: {fileID: 0}
height: 0
duration: 0
useLastRealPos: 0
values:
- key: rot
value: 0
- name: GirlFastFlaskIn - name: GirlFastFlaskIn
preview: 0 preview: 0
anchor: {fileID: 0} anchor: {fileID: 0}

View file

@ -551,9 +551,9 @@ RectTransform:
m_Father: {fileID: 574002313} m_Father: {fileID: 574002313}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &9435782 --- !u!114 &9435782
@ -4176,9 +4176,9 @@ RectTransform:
m_Father: {fileID: 539838476} m_Father: {fileID: 539838476}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 32, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &121871281 --- !u!114 &121871281
@ -4400,9 +4400,9 @@ RectTransform:
m_Father: {fileID: 539838476} m_Father: {fileID: 539838476}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 72, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &129013734 --- !u!114 &129013734
@ -4536,9 +4536,9 @@ RectTransform:
m_Father: {fileID: 539838476} m_Father: {fileID: 539838476}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 112, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5} m_Pivot: {x: 1, y: 0.5}
--- !u!114 &151246938 --- !u!114 &151246938
@ -14033,7 +14033,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 171581557} m_TargetGraphic: {fileID: 171581557}
m_HandleRect: {fileID: 171581556} m_HandleRect: {fileID: 171581556}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 1
m_Size: 1 m_Size: 1
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
@ -16665,7 +16665,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -50.000015} m_AnchoredPosition: {x: 0, y: -50}
m_SizeDelta: {x: -48, y: -148} m_SizeDelta: {x: -48, y: -148}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &572765323 --- !u!114 &572765323
@ -32715,7 +32715,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 108.85712} m_AnchoredPosition: {x: 0, y: 109.67346}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1154875945 --- !u!222 &1154875945
@ -37258,9 +37258,9 @@ RectTransform:
m_Father: {fileID: 574002313} m_Father: {fileID: 574002313}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 40, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1345846031 --- !u!114 &1345846031
@ -43464,7 +43464,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1220118244} m_HandleRect: {fileID: 1220118244}
m_Direction: 2 m_Direction: 2
m_Value: 1.0000004 m_Value: 1.0000004
m_Size: 0.50367343 m_Size: 0.5104374
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@ -46884,9 +46884,9 @@ RectTransform:
m_Father: {fileID: 574002313} m_Father: {fileID: 574002313}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 80, y: -21} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32} m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1783491359 --- !u!114 &1783491359

View file

@ -1,8 +1,8 @@
using System; using System;
public static class AppInfo { public static class AppInfo {
public const string Version = "1.0.10"; public const string Version = "1.0.11";
public static readonly DateTime Date = new DateTime(2024, 02, 13, 11, 14, 29, 110, DateTimeKind.Utc); public static readonly DateTime Date = new DateTime(2024, 02, 14, 12, 00, 21, 123, DateTimeKind.Utc);
} }

View file

@ -88,6 +88,16 @@ namespace HeavenStudio.Games.Loaders
} }
}, },
new GameAction("clouds", "Clouds")
{
function = delegate { LoveLab.instance.cloudMove(e.currentEntity["toggle"]); },
defaultLength = .5f,
parameters = new List<Param>()
{
new Param("toggle", true, "Move", "Move Clouds?")
}
},
new GameAction("spotlight", "Spotlight") new GameAction("spotlight", "Spotlight")
{ {
function = delegate { LoveLab.instance.spotlight(e.currentEntity["toggle"], e.currentEntity["spotType"], e.currentEntity["posType"]); }, function = delegate { LoveLab.instance.spotlight(e.currentEntity["toggle"], e.currentEntity["spotType"], e.currentEntity["posType"]); },
@ -119,35 +129,37 @@ namespace HeavenStudio.Games
public static LoveLab instance { get; set; } public static LoveLab instance { get; set; }
[Header("Lab Guy")] [Header("Lab Guy")]
[SerializeField] private Animator labGuy; [SerializeField] Animator labGuy;
public Animator labGuyHead; [SerializeField] Animator labGuyHead;
public Animator labGuyArm; [SerializeField] Animator labGuyArm;
[Header("Lab Girl")] [Header("Lab Girl")]
[SerializeField] private Animator labGirl; [SerializeField] Animator labGirl;
public Animator labGirlHead; [SerializeField] Animator labGirlHead;
public Animator labGirlArm; [SerializeField] Animator labGirlArm;
[Header("Lab Weird")] [Header("Lab Weird")]
[SerializeField] private Animator labAssistant; [SerializeField] Animator labAssistant;
[SerializeField] private Animator labAssistantHead; [SerializeField] Animator labAssistantHead;
public Animator labAssistantArm; [SerializeField] Animator labAssistantArm;
[Header("Flask")] [Header("Flask")]
public GameObject flask; public GameObject flask;
[SerializeField] private GameObject labFlaskObj; [SerializeField] GameObject labFlaskObj;
public GameObject labGirlFlaskObj; public GameObject labGirlFlaskObj;
public ParticleSystem boyFlaskBreak; [SerializeField] ParticleSystem boyFlaskBreak;
public ParticleSystem girlFlaskBreak; [SerializeField] ParticleSystem girlFlaskBreak;
public Material flaskMatForBoy; [SerializeField] Material flaskMatForBoy;
public Material flaskMatForGirl; [SerializeField] Material flaskMatForGirl;
public Material flaskMatForWeird; [SerializeField] Material flaskMatForWeird;
public Color boyLiquidColor = new Color(0.02909997f, 0.4054601f, 0.97f); //216, 97, 97 0868F8 [SerializeField] Color boyLiquidColor = new Color(0.02909997f, 0.4054601f, 0.97f); //216, 97, 97 0868F8
public Color girlLiquidColor = new Color(0.972549f, 0.3764706f, 0.03137255f); //F86008 [SerializeField] Color girlLiquidColor = new Color(0.972549f, 0.3764706f, 0.03137255f); //F86008
public Color weirdLiquidColor = new Color(0.8313726f, 0.2039216f, 0.5058824f); //331, 75, 83 D43481 [SerializeField] Color weirdLiquidColor = new Color(0.8313726f, 0.2039216f, 0.5058824f); //331, 75, 83 D43481
public SpriteRenderer flaskSpriteRend; [SerializeField] SpriteRenderer flaskSpriteRend;
public SpriteRenderer girlFlaskSpriteRend; [SerializeField] SpriteRenderer girlFlaskSpriteRend;
public SpriteRenderer weirdFlaskSpriteRend; [SerializeField] SpriteRenderer weirdFlaskSpriteRend;
[SerializeField] List<string> flaskArcToBoy = new List<string>();
[SerializeField] List<string> flaskArcToGirl = new List<string>();
[Header("Hearts")] [Header("Hearts")]
public List<heartDetails> reqHeartsContainer = new List<heartDetails>(); public List<heartDetails> reqHeartsContainer = new List<heartDetails>();
@ -157,10 +169,10 @@ namespace HeavenStudio.Games
[SerializeField] GameObject spotlightShader; [SerializeField] GameObject spotlightShader;
[SerializeField] GameObject spotlightShaderCone; [SerializeField] GameObject spotlightShaderCone;
[SerializeField] GameObject spotlightCone; [SerializeField] GameObject spotlightCone;
[SerializeField] private GameObject labHeartBox; [SerializeField] GameObject labHeartBox;
[SerializeField] private Animator boxPerson; [SerializeField] Animator boxPerson;
[SerializeField] private Animator boxPersonDay; [SerializeField] Animator boxPersonDay;
[SerializeField] private GameObject heartContainer; [SerializeField] GameObject heartContainer;
[SerializeField] GameObject labGuyFlask; [SerializeField] GameObject labGuyFlask;
[SerializeField] GameObject labGirlFlask; [SerializeField] GameObject labGirlFlask;
public static List<QueuedFlask> queuedFlask = new List<QueuedFlask>(); public static List<QueuedFlask> queuedFlask = new List<QueuedFlask>();
@ -170,7 +182,7 @@ namespace HeavenStudio.Games
[Header("Variables")] [Header("Variables")]
public bool hasMissed = false; public bool hasMissed = false;
private bool canBop = false; bool canBop = false;
public bool bopRight = false; public bool bopRight = false;
public bool isHoldingWhiff = false; public bool isHoldingWhiff = false;
bool isHoldingWhiffAlt = false; bool isHoldingWhiffAlt = false;
@ -182,12 +194,12 @@ namespace HeavenStudio.Games
public int counter = 0; public int counter = 0;
bool isLong = false; bool isLong = false;
int isLongCount = 0; int isLongCount = 0;
bool canCloudsMove = true;
[Header("Clouds")] [Header("Clouds")]
[SerializeField] GameObject clouds; [SerializeField] GameObject clouds;
public float cloudSpeed; [SerializeField] float cloudSpeed;
public float cloudDistance; [SerializeField] float cloudDistance;
[Header("Time Of Day")] [Header("Time Of Day")]
[SerializeField] GameObject sunsetBG; [SerializeField] GameObject sunsetBG;
@ -274,6 +286,54 @@ namespace HeavenStudio.Games
#endregion #endregion
#region intervals #region intervals
public void playFlaskBreak(int whichFlask)
{
if(whichFlask == 0) //guy
{
boyFlaskBreak.Play();
}
else
{
girlFlaskBreak.Play();
}
}
public void labGuyIdleState()
{
labGuyHead.DoScaledAnimationAsync("GuyFaceIdle");
if (labGuyArm.IsAnimationNotPlaying())
{
labGuyArm.Play("ArmIdle");
}
}
public void labGirlIdleState()
{
instance.labGirlHead.Play("GirlIdleFace");
if (instance.labGirlArm.IsAnimationNotPlaying())
{
instance.labGirlArm.DoScaledAnimationAsync("ArmIdle");
}
}
public void labWeirdEndState(double beat, float addBeat, GameObject flaskObj)
{
BeatAction.New(LoveLab.instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + addBeat, delegate
{
Destroy(flaskObj);
weirdInstantiatedFlask.RemoveAt(0);
labAssistantArm.DoScaledAnimationAsync("MittenGrab", 1f);
}),
new BeatAction.Action(beat + (addBeat + .5f), delegate
{
labAssistantArm.DoScaledAnimationAsync("MittenLetGo", 1f);
}),
});
}
public enum throwFlaskSpeedType public enum throwFlaskSpeedType
{ {
fastFlask, fastFlask,
@ -310,7 +370,14 @@ namespace HeavenStudio.Games
List<RiqEntity> reqShakeEvents = GetAllFlaskBetween(beat, beat + interval); List<RiqEntity> reqShakeEvents = GetAllFlaskBetween(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); //howManyShakes.Add(reqShakeEvents.Count);
//howManyShakesCounter.Add(0);
string reqArc = "";
reqArc = reqShakeEvents[reqShakeEvents.Count - 1]["speed"] == 0 ? flaskArcToBoy[0] : flaskArcToBoy[1];
spawnCustomFlask(reqShakeEvents[0].beat, reqArc);
this.counter = reqShakeEvents.Count; this.counter = reqShakeEvents.Count;
@ -319,11 +386,13 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate new BeatAction.Action(beat, delegate
{ {
//initial shakes //initial shakes
instance.hasMissed = false;
if (autoPassTurn) if (autoPassTurn)
{ {
//pass to girl //pass to girl
BoyPassToGirl(beat + interval, beat, beat + interval, 1, reqShakeEvents.Count); //Debug.LogWarning("test");
BoyPassToGirl(beat + interval, beat, beat + interval, 1, 0);
} }
}) })
}; };
@ -335,7 +404,7 @@ namespace HeavenStudio.Games
queuedFlasks.Add(new BeatAction.Action(shakeEventToCheck.beat, delegate queuedFlasks.Add(new BeatAction.Action(shakeEventToCheck.beat, delegate
{ {
//lab boy shake //lab boy shake
boyShake(shakeEventToCheck.beat, shakeEventToCheck.length, beat, beat + interval, shakeEventToCheck["speed"]); boyShake(shakeEventToCheck.beat, shakeEventToCheck.length, beat, beat + interval, interval, shakeEventToCheck["speed"]);
})); }));
} }
} }
@ -357,27 +426,37 @@ namespace HeavenStudio.Games
return tempEvents; return tempEvents;
} }
private void boyShake(double beat, double length, double firstBeatOfInterval, double lastBeatOfInterval, int speedType) private void girlLook(double beat, double length)
{ {
//debug stuff float speedLook = 0;
speedLook = length <= .5f ? 0 : .5f;
labGuyHead.DoScaledAnimationAsync("GuyRightFace");
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + speedLook, delegate
{
labGirlHead.Play("GirlLeftFace");
})
});
}
private void boyShake(double beat, double length, double firstBeatOfInterval, double lastBeatOfInterval, double intervalLength, int speedType)
{
#region debug stuff
//Debug.LogWarning("Beat: " + beat); //Debug.LogWarning("Beat: " + beat);
//Debug.LogWarning("Length: " + (beat + length)); //Debug.LogWarning("Length: " + (beat + length));
//Debug.LogWarning("First Beat: " + firstBeatOfInterval); //Debug.LogWarning("First Beat: " + firstBeatOfInterval);
//Debug.LogWarning("Last Beat: " + lastBeatOfInterval); //Debug.LogWarning("Last Beat: " + lastBeatOfInterval);
//Debug.LogWarning("Speed Type: " + speedType); //Debug.LogWarning("Speed Type: " + speedType);
#endregion
BeatAction.New(instance, new List<BeatAction.Action>() BeatAction.New(instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(beat, delegate { new BeatAction.Action(beat, delegate {
girlLook(beat, intervalLength);
labGuyHead.DoScaledAnimationAsync("GuyRightFace");
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + .5f, delegate
{
labGirlHead.Play("GirlLeftFace");
})
});
if (!hasStartedInterval) if (!hasStartedInterval)
{ {
SoundByte.PlayOneShotGame("loveLab/LeftCatch", beat, forcePlay: true); SoundByte.PlayOneShotGame("loveLab/LeftCatch", beat, forcePlay: true);
@ -408,11 +487,37 @@ namespace HeavenStudio.Games
}); });
} }
public List<int> howManyShakes = new List<int>();
public List<int> howManyShakesCounter = new List<int>();
public List<double> howManyShakesEndBeat = new List<double>();
public struct test
{
public double beat;
public double startBeat;
public double endBeat;
public double length;
}
List<test> idk = new List<test>();
public void clearShakeList()
{
howManyShakes.RemoveAt(0);
howManyShakesCounter.RemoveAt(0);
howManyShakesEndBeat.RemoveAt(0);
idk.RemoveAt(0);
}
private void BoyPassToGirl(double beat, double intervalBeat, double endBeat, float length, int counter) private void BoyPassToGirl(double beat, double intervalBeat, double endBeat, float length, int counter)
{ {
var inputs = GetAllFlaskBetween(intervalBeat, endBeat); var inputs = GetAllFlaskBetween(intervalBeat, endBeat);
inputs.Sort((x, y) => x.beat.CompareTo(y.beat)); inputs.Sort((x, y) => x.beat.CompareTo(y.beat));
howManyShakes.Add(inputs.Count);
float addDelay = 0f; float addDelay = 0f;
inputs[0]["speed"] = inputs[inputs.Count - 1]["speed"]; inputs[0]["speed"] = inputs[inputs.Count - 1]["speed"];
@ -428,7 +533,7 @@ namespace HeavenStudio.Games
{ {
addDelay = 0f; addDelay = 0f;
} }
else if(inputs[0]["speed"] == 2) else if (inputs[0]["speed"] == 2)
{ {
addDelay = .5f; addDelay = .5f;
} }
@ -441,26 +546,34 @@ namespace HeavenStudio.Games
{ {
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 addForEndBeat = (input.beat + input.length) - intervalBeat;
ScheduleInput(beat, (length + relativeBeat) + addDelay, InputAction_Nrm, onCatch, onMiss, onEmpty); if(i == 0)
if ((inputs[i].beat + inputs[i].length) >= endBeat)
{ {
ScheduleInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onRelease, onMiss, onEmpty); ScheduleInput(beat, (length + relativeBeat) + addDelay, InputAction_BasicPress, onCatch, onMiss, onEmpty);
} }
else else
{ {
ScheduleAutoplayInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onUpAuto, onMiss, onEmpty); ScheduleAutoplayInput(beat, (length + relativeBeat) + addDelay, InputAction_Alt, onDownAuto, onMiss, onEmpty);
}
if ((inputs[i].beat + inputs[i].length) >= endBeat)
{
ScheduleInput(beat, (length + addForEndBeat) + addDelay, IA_FlickRelease, onRelease, onMiss, onEmpty);
}
else
{
ScheduleInput(beat, (length + addForEndBeat) + addDelay, InputAction_Nrm, onUp, onMiss, onEmpty);
} }
} }
BeatAction.New(this, new List<BeatAction.Action>() BeatAction.New(this, new List<BeatAction.Action>()
{ {
new BeatAction.Action(beat, delegate new BeatAction.Action(beat, delegate
{ {
hasMissed = false; hasMissed = false;
}), }),
new BeatAction.Action(endBeat + 1f, delegate new BeatAction.Action(endBeat + 1f, delegate
{ {
@ -473,6 +586,7 @@ namespace HeavenStudio.Games
}); });
} }
public static void onCatch(PlayerActionEvent caller, float beat) public static void onCatch(PlayerActionEvent caller, float beat)
{ {
instance.labGirlHead.Play("GirlIdleFace"); instance.labGirlHead.Play("GirlIdleFace");
@ -489,15 +603,20 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("loveLab/shakeDown"); SoundByte.PlayOneShotGame("loveLab/shakeDown");
instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskDown"); instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskDown");
} }
} }
public static void onUpAuto(PlayerActionEvent caller, float beat) public static void onUp(PlayerActionEvent caller, float beat)
{ {
SoundByte.PlayOneShotGame("loveLab/shakeUp"); SoundByte.PlayOneShotGame("loveLab/shakeUp");
instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskUp"); instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskUp");
} }
public static void onDownAuto(PlayerActionEvent caller, float beat)
{
SoundByte.PlayOneShotGame("loveLab/shakeDown");
instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskDown");
}
public static void onRelease(PlayerActionEvent caller, float beat) public static void onRelease(PlayerActionEvent caller, float beat)
{ {
instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace"); instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace");
@ -506,6 +625,8 @@ namespace HeavenStudio.Games
instance.isHolding = false; instance.isHolding = false;
instance.hasStartedInterval = false; instance.hasStartedInterval = false;
//instance.clearShakeList();
instance.spawnFlaskForWeird((caller.startBeat + caller.timer)); instance.spawnFlaskForWeird((caller.startBeat + caller.timer));
var lastCounter = instance.counter; var lastCounter = instance.counter;
@ -514,25 +635,20 @@ namespace HeavenStudio.Games
{ {
new BeatAction.Action((caller.startBeat + caller.timer) + 1f, delegate new BeatAction.Action((caller.startBeat + caller.timer) + 1f, delegate
{ {
instance.labGirlHead.Play("GirlIdleFace"); instance.labGirlIdleState();
if (instance.labGirlArm.IsAnimationNotPlaying())
{
instance.labGirlArm.DoScaledAnimationAsync("ArmIdle");
}
SoundByte.PlayOneShotGame("loveLab/heartsCombine"); SoundByte.PlayOneShotGame("loveLab/heartsCombine");
}), }),
}); });
var additionalHearts = 0.063f;
for (int x = 0; x < lastCounter; x++) for (int x = 0; x < lastCounter; x++)
{ {
//Debug.LogWarning("Add: " + (2.75f + (additionalHearts * (x)))); //Debug.LogWarning("Add: " + (2.75f + (additionalHearts * (x))));
//Debug.LogWarning("Pitch: " + (1f + (pitchHearts * (x)))); //Debug.LogWarning("Pitch: " + (1f + (pitchHearts * (x))));
//Debug.LogWarning("x: " + x); //Debug.LogWarning("x: " + x);
var additionalHearts = 0.063f;
var a = x; var a = x;
BeatAction.New(instance, new List<BeatAction.Action>() BeatAction.New(instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action((caller.startBeat + caller.timer) + (2.25f + (additionalHearts * a)), delegate new BeatAction.Action((caller.startBeat + caller.timer) + (2.25f + (additionalHearts * a)), delegate
@ -552,10 +668,45 @@ namespace HeavenStudio.Games
} }
} }
public static void onMiss(PlayerActionEvent caller)
{
//SoundByte.PlayOneShot("miss");
instance.hasMissed = true;
instance.labGuyHead.DoScaledAnimationAsync("GuyIdleFace");
if (instance.labGuyArm.IsAnimationNotPlaying())
{
instance.labGuyArm.Play("ArmIdle");
}
//instance.reqHeartsContainer.RemoveAt(0);
Destroy(instance.girlInstantiatedFlask[0].gameObject);
instance.boyFlaskBreak.Play();
instance.girlInstantiatedFlask.RemoveAt(0);
if (instance.reqHeartsContainer.Count > 0)
{
instance.reqHeartsContainer.RemoveAt(0);
}
}
public static void onMissWhenHold(PlayerActionEvent caller)
{
Debug.LogWarning(caller.timer);
instance.reqHeartsContainer.RemoveAt(0);
LoveLabForGirlFlask spawnedFlask = Instantiate(instance.labGirlFlaskObj, instance.transform).AddComponent<LoveLabForGirlFlask>();
spawnedFlask.onMissWhenHold((caller.startBeat + caller.timer) + 1f);
}
public static void onEmpty(PlayerActionEvent caller)
{
//empty
}
public void bagHeartSound(int x) public void bagHeartSound(int x)
{ {
var pitchHearts = 0.14f; var pitchHearts = 0.14f;
SoundByte.PlayOneShotGame("loveLab/bagHeart", pitch: (1f + (pitchHearts * (x)))); SoundByte.PlayOneShotGame("loveLab/bagHeart", pitch: 1f + (pitchHearts * x));
instance.heartBox.DoScaledAnimationAsync("HeartBoxSquish"); instance.heartBox.DoScaledAnimationAsync("HeartBoxSquish");
} }
@ -573,23 +724,28 @@ namespace HeavenStudio.Games
switch (flaskHeart) switch (flaskHeart)
{ {
case 0: case 0:
spawnedFlask.FastInit(beat); spawnedFlask.girlArc(beat, flaskArcToGirl[0]);
break; break;
case 1: case 1:
spawnedFlask.SlowInit(beat); spawnedFlask.girlArc(beat, flaskArcToGirl[1]);
break; break;
case 2: case 2:
spawnedFlask.MidSlowInit(beat); spawnedFlask.girlArc(beat, flaskArcToGirl[2]);
break; break;
} }
girlInstantiatedFlask.Add(spawnedFlask.GetComponent<LoveLabForGirlFlask>()); girlInstantiatedFlask.Add(spawnedFlask.GetComponent<LoveLabForGirlFlask>());
} }
public void spawnCustomFlask(double beat) //wall to boy public void spawnCustomFlask(double beat, string reqArc) //wall to boy
{ {
LoveLabFlask spawnedFlask = Instantiate(labFlaskObj, instance.transform).AddComponent<LoveLabFlask>(); LoveLabFlask spawnedFlask = Instantiate(labFlaskObj, instance.transform).AddComponent<LoveLabFlask>();
spawnedFlask.customShakes(beat); spawnedFlask.customShakes(beat, reqArc);
}
public void cloudMove(bool canMove)
{
canCloudsMove = canMove;
} }
#endregion #endregion
@ -643,6 +799,12 @@ namespace HeavenStudio.Games
* *
*/ */
/*
* bops
* check for offbeat bops (auto)
* beat 0 weird bug
*/
[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)
@ -756,6 +918,14 @@ namespace HeavenStudio.Games
#region IA #region IA
const int IA_AltPress = IAMAXCAT; const int IA_AltPress = IAMAXCAT;
public static PlayerInput.InputAction IA_FlickPress =
new("NtrLabFlickPress", new int[] { IAPressCat, IAFlickCat, IAPressCat },
IA_PadBasicPress, IA_TouchFlick, IA_BatonBasicPress);
public static PlayerInput.InputAction IA_FlickRelease =
new("NtrLabFlickRelease", new int[] { IAReleaseCat, IAFlickCat, IAReleaseCat },
IA_PadBasicRelease, IA_TouchFlick, IA_BatonBasicRelease);
protected static bool IA_TouchNrmPress(out double dt) protected static bool IA_TouchNrmPress(out double dt)
{ {
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt) return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
@ -814,6 +984,11 @@ namespace HeavenStudio.Games
return PlayerInput.GetBaton(InputController.ActionsBaton.Face); return PlayerInput.GetBaton(InputController.ActionsBaton.Face);
} }
public static PlayerInput.InputAction InputAction_TouchRelease =
new("NtrLabRelease", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat },
IA_Empty, IA_TouchBasicRelease, IA_Empty);
public static PlayerInput.InputAction InputAction_Nrm = public static PlayerInput.InputAction InputAction_Nrm =
new("NtrLabAlt", new int[] { IAPressCat, IAPressCat, IAPressCat }, new("NtrLabAlt", new int[] { IAPressCat, IAPressCat, IAPressCat },
IA_PadBasicPress, IA_TouchNrmPress, IA_BatonBasicPress); IA_PadBasicPress, IA_TouchNrmPress, IA_BatonBasicPress);
@ -850,7 +1025,8 @@ namespace HeavenStudio.Games
private void Start() private void Start()
{ {
clouds.transform.position = Vector3.left * ((Time.realtimeSinceStartup * cloudSpeed) % cloudDistance); if (canCloudsMove) clouds.transform.position = Vector3.left * ((Time.realtimeSinceStartup * cloudSpeed) % cloudDistance);
else clouds.transform.position = new Vector2(0, 0);
} }
// Editor gizmo to draw trajectories // Editor gizmo to draw trajectories
@ -990,33 +1166,39 @@ namespace HeavenStudio.Games
//} //}
#endregion #endregion
clouds.transform.position = Vector3.left * ((Time.realtimeSinceStartup * cloudSpeed) % cloudDistance); if (canCloudsMove) clouds.transform.position = Vector3.left * ((Time.realtimeSinceStartup * cloudSpeed) % cloudDistance);
else clouds.transform.position = new Vector2(0, 0);
} }
#region Bops #region Bops
public void Bopping()
{
if (bopRight && labGuy.IsAnimationNotPlaying())
{
labGuy.DoScaledAnimationAsync("GuyBopRight", .5f);
labGirl.DoScaledAnimationAsync("GirlBopRight", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopRight", .5f);
}
else
{
labGuy.DoScaledAnimationAsync("GuyBopLeft", .5f);
labGirl.DoScaledAnimationAsync("GirlBopLeft", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopLeft", .5f);
}
bopRight = !bopRight;
}
public void Bop(double beat, float length, bool bop, bool autoBop) public void Bop(double beat, float length, bool bop, bool autoBop)
{ {
if (bop) if (bop)
{ {
for (int i = 0; i < length; i++) for (int i = 0; i < length; i++)
{ {
var a = i;
BeatAction.New(instance, new List<BeatAction.Action>() BeatAction.New(instance, new List<BeatAction.Action>()
{ {
new BeatAction.Action(beat + i, delegate new BeatAction.Action(beat + a, delegate
{ {
if (!bopRight && labGuy.IsAnimationNotPlaying()) Bopping();
{
labGuy.DoScaledAnimationAsync("GuyBopRight", .5f);
labGirl.DoScaledAnimationAsync("GirlBopRight", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopRight", .5f);
}
else
{
labGuy.DoScaledAnimationAsync("GuyBopLeft", .5f);
labGirl.DoScaledAnimationAsync("GirlBopLeft", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopLeft", .5f);
}
bopRight = !bopRight;
}) })
}); });
} }
@ -1031,7 +1213,7 @@ namespace HeavenStudio.Games
} }
} }
public override void OnBeatPulse(double beat) public override void OnLateBeatPulse(double beat)
{ {
if (BeatIsInBopRegion(beat)) SingleBop(); if (BeatIsInBopRegion(beat)) SingleBop();
} }
@ -1045,19 +1227,7 @@ namespace HeavenStudio.Games
{ {
if (canBop) if (canBop)
{ {
if (!bopRight && labGuy.IsAnimationNotPlaying()) Bopping();
{
labGuy.DoScaledAnimationAsync("GuyBopRight", .5f);
labGirl.DoScaledAnimationAsync("GirlBopRight", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopRight", .5f);
}
else
{
labGuy.DoScaledAnimationAsync("GuyBopLeft", .5f);
labGirl.DoScaledAnimationAsync("GirlBopLeft", .5f);
labAssistant.DoScaledAnimationAsync("AssistantBopLeft", .5f);
}
bopRight = !bopRight;
} }
} }
@ -1122,39 +1292,6 @@ namespace HeavenStudio.Games
#endregion #endregion
public static void onMiss(PlayerActionEvent caller)
{
//SoundByte.PlayOneShot("miss");
//instance.hasMissed = true;
instance.labGuyHead.DoScaledAnimationAsync("GuyIdleFace");
if (instance.labGuyArm.IsAnimationNotPlaying())
{
instance.labGuyArm.Play("ArmIdle");
}
//instance.reqHeartsContainer.RemoveAt(0);
Destroy(instance.girlInstantiatedFlask[0].gameObject);
instance.boyFlaskBreak.Play();
instance.girlInstantiatedFlask.RemoveAt(0);
if(instance.reqHeartsContainer.Count > 0)
{
instance.reqHeartsContainer.RemoveAt(0);
}
}
public static void onMissWhenHold(PlayerActionEvent caller)
{
Debug.LogWarning(caller.timer);
instance.reqHeartsContainer.RemoveAt(0);
LoveLabForGirlFlask spawnedFlask = Instantiate(instance.labGirlFlaskObj, instance.transform).AddComponent<LoveLabForGirlFlask>();
spawnedFlask.onMissWhenHold((caller.startBeat + caller.timer) + 1f);
}
public static void onEmpty(PlayerActionEvent caller)
{
//empty
}
} }
} }

View file

@ -1,11 +1,9 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using HeavenStudio.Util; using HeavenStudio.Util;
namespace HeavenStudio.Games.Scripts_LoveLab namespace HeavenStudio.Games.Scripts_LoveLab
{ {
public class LoveLabFlask : SuperCurveObject public class LoveLabFlask : SuperCurveObject
@ -34,9 +32,9 @@ namespace HeavenStudio.Games.Scripts_LoveLab
} }
} }
public void customShakes(double beat) public void customShakes(double beat, string reqArc)
{ {
path = game.GetPath("GuyFlaskIn"); path = game.GetPath(reqArc);
UpdateLastRealPos(); UpdateLastRealPos();
pathStartBeat = beat - 1f; pathStartBeat = beat - 1f;
@ -58,17 +56,12 @@ namespace HeavenStudio.Games.Scripts_LoveLab
{ {
//SoundByte.PlayOneShot("miss"); //SoundByte.PlayOneShot("miss");
//LoveLab.instance.hasMissed = true; //LoveLab.instance.hasMissed = true;
LoveLab.instance.labGuyHead.DoScaledAnimationAsync("GuyFaceIdle"); LoveLab.instance.labGuyIdleState();
if (LoveLab.instance.labGuyArm.IsAnimationNotPlaying())
{
LoveLab.instance.labGuyArm.Play("ArmIdle");
}
//LoveLab.instance.reqHeartsContainer.RemoveAt(0); //LoveLab.instance.reqHeartsContainer.RemoveAt(0);
Destroy(LoveLab.instance.girlInstantiatedFlask[0].gameObject); Destroy(LoveLab.instance.girlInstantiatedFlask[0].gameObject);
LoveLab.instance.boyFlaskBreak.Play(); LoveLab.instance.playFlaskBreak(0);
LoveLab.instance.girlInstantiatedFlask.RemoveAt(0); LoveLab.instance.girlInstantiatedFlask.RemoveAt(0);
if(LoveLab.instance.reqHeartsContainer.Count > 0) if(LoveLab.instance.reqHeartsContainer.Count > 0)
@ -88,5 +81,4 @@ namespace HeavenStudio.Games.Scripts_LoveLab
//empty //empty
} }
} }
} }

View file

@ -1,8 +1,6 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Starpelly;
using HeavenStudio.Util; using HeavenStudio.Util;
@ -17,19 +15,12 @@ namespace HeavenStudio.Games.Scripts_LoveLab
private Conductor conductor; private Conductor conductor;
public LoveLab.flaskHeart heartType; public LoveLab.flaskHeart heartType;
void Awake() void Awake()
{ {
game = LoveLab.instance; game = LoveLab.instance;
conductor = Conductor.instance; conductor = Conductor.instance;
} }
void Start()
{
}
// Update is called once per frame
void Update() void Update()
{ {
double beat = conductor.songPositionInBeatsAsDouble; double beat = conductor.songPositionInBeatsAsDouble;
@ -43,9 +34,9 @@ namespace HeavenStudio.Games.Scripts_LoveLab
} }
} }
public void FastInit(double beat) public void girlArc(double beat, string reqArc)
{ {
path = game.GetPath("GirlFastFlaskIn"); path = game.GetPath(reqArc);
UpdateLastRealPos(); UpdateLastRealPos();
pathStartBeat = beat - 1f; pathStartBeat = beat - 1f;
@ -55,32 +46,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
gameObject.SetActive(true); gameObject.SetActive(true);
} }
public void SlowInit(double beat)
{
path = game.GetPath("GirlSlowFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
Vector3 pos = GetPathPositionFromBeat(path, pathStartBeat, pathStartBeat);
transform.position = pos;
gameObject.SetActive(true);
}
public void MidSlowInit(double beat)
{
path = game.GetPath("GirlMidSlowFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
Vector3 pos = GetPathPositionFromBeat(path, pathStartBeat, pathStartBeat);
transform.position = pos;
gameObject.SetActive(true);
game.flask = this.gameObject;
}
public void ForWeirdInit(double beat) public void ForWeirdInit(double beat)
{ {
path = game.GetPath("WeirdFlaskIn"); path = game.GetPath("WeirdFlaskIn");
@ -92,21 +57,7 @@ namespace HeavenStudio.Games.Scripts_LoveLab
gameObject.SetActive(true); gameObject.SetActive(true);
BeatAction.New(LoveLab.instance, new List<BeatAction.Action>() game.labWeirdEndState(beat, 1f, this.gameObject);
{
new BeatAction.Action(beat + 1f, delegate
{
Destroy(this.gameObject);
LoveLab.instance.weirdInstantiatedFlask.RemoveAt(0);
LoveLab.instance.labAssistantArm.DoScaledAnimationAsync("MittenGrab", 1f);
}),
new BeatAction.Action(beat + 1.5f, delegate
{
LoveLab.instance.labAssistantArm.DoScaledAnimationAsync("MittenLetGo", 1f);
}),
});
} }
@ -124,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_LoveLab
BeatAction.New(game, new List<BeatAction.Action>() BeatAction.New(game, new List<BeatAction.Action>()
{ {
new BeatAction.Action(beat, delegate { new BeatAction.Action(beat, delegate {
game.girlFlaskBreak.Play(); game.playFlaskBreak(1);
Destroy(this.gameObject); }) Destroy(this.gameObject); })
}); });
} }
@ -135,5 +86,4 @@ namespace HeavenStudio.Games.Scripts_LoveLab
Destroy(this.gameObject); Destroy(this.gameObject);
} }
} }
} }

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.10 bundleVersion: 1.0.11
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: 100010 Standalone: 100011
iPhone: 0 iPhone: 0
tvOS: 0 tvOS: 0
overrideDefaultApplicationIdentifier: 0 overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 100010 AndroidBundleVersionCode: 100011
AndroidMinSdkVersion: 22 AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1 AndroidPreferredInstallLocation: 1