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}
girlFlaskSpriteRend: {fileID: 4174149414944176317}
weirdFlaskSpriteRend: {fileID: 7917972493379982696}
flaskArcToBoy:
- GuyFlaskFastIn
- GuyFlaskSlowIn
flaskArcToGirl:
- GirlFastFlaskIn
- GirlSlowFlaskIn
- GirlMidSlowFlaskIn
heartBox: {fileID: 6043310135498338089}
spotlightShader: {fileID: 5748955415339632706}
spotlightShaderCone: {fileID: 2784226145224311011}
@ -665,7 +672,7 @@ MonoBehaviour:
weirdShader: {fileID: 2100000, guid: 39514fb7dcd08a64bbd28251e98d9a6a, type: 2}
weirdHeaderShader: {fileID: 5930860602689851574}
flaskBouncePath:
- name: GuyFlaskIn
- name: GuyFlaskIn (orig)
preview: 0
anchor: {fileID: 0}
positions:
@ -687,6 +694,50 @@ MonoBehaviour:
values:
- key: rot
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
preview: 0
anchor: {fileID: 0}

View file

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

View file

@ -1,8 +1,8 @@
using System;
public static class AppInfo {
public const string Version = "1.0.10";
public static readonly DateTime Date = new DateTime(2024, 02, 13, 11, 14, 29, 110, DateTimeKind.Utc);
public const string Version = "1.0.11";
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")
{
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; }
[Header("Lab Guy")]
[SerializeField] private Animator labGuy;
public Animator labGuyHead;
public Animator labGuyArm;
[SerializeField] Animator labGuy;
[SerializeField] Animator labGuyHead;
[SerializeField] Animator labGuyArm;
[Header("Lab Girl")]
[SerializeField] private Animator labGirl;
public Animator labGirlHead;
public Animator labGirlArm;
[SerializeField] Animator labGirl;
[SerializeField] Animator labGirlHead;
[SerializeField] Animator labGirlArm;
[Header("Lab Weird")]
[SerializeField] private Animator labAssistant;
[SerializeField] private Animator labAssistantHead;
public Animator labAssistantArm;
[SerializeField] Animator labAssistant;
[SerializeField] Animator labAssistantHead;
[SerializeField] Animator labAssistantArm;
[Header("Flask")]
public GameObject flask;
[SerializeField] private GameObject labFlaskObj;
[SerializeField] GameObject labFlaskObj;
public GameObject labGirlFlaskObj;
public ParticleSystem boyFlaskBreak;
public ParticleSystem girlFlaskBreak;
public Material flaskMatForBoy;
public Material flaskMatForGirl;
public Material flaskMatForWeird;
public 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
public Color weirdLiquidColor = new Color(0.8313726f, 0.2039216f, 0.5058824f); //331, 75, 83 D43481
public SpriteRenderer flaskSpriteRend;
public SpriteRenderer girlFlaskSpriteRend;
public SpriteRenderer weirdFlaskSpriteRend;
[SerializeField] ParticleSystem boyFlaskBreak;
[SerializeField] ParticleSystem girlFlaskBreak;
[SerializeField] Material flaskMatForBoy;
[SerializeField] Material flaskMatForGirl;
[SerializeField] Material flaskMatForWeird;
[SerializeField] Color boyLiquidColor = new Color(0.02909997f, 0.4054601f, 0.97f); //216, 97, 97 0868F8
[SerializeField] Color girlLiquidColor = new Color(0.972549f, 0.3764706f, 0.03137255f); //F86008
[SerializeField] Color weirdLiquidColor = new Color(0.8313726f, 0.2039216f, 0.5058824f); //331, 75, 83 D43481
[SerializeField] SpriteRenderer flaskSpriteRend;
[SerializeField] SpriteRenderer girlFlaskSpriteRend;
[SerializeField] SpriteRenderer weirdFlaskSpriteRend;
[SerializeField] List<string> flaskArcToBoy = new List<string>();
[SerializeField] List<string> flaskArcToGirl = new List<string>();
[Header("Hearts")]
public List<heartDetails> reqHeartsContainer = new List<heartDetails>();
@ -157,10 +169,10 @@ namespace HeavenStudio.Games
[SerializeField] GameObject spotlightShader;
[SerializeField] GameObject spotlightShaderCone;
[SerializeField] GameObject spotlightCone;
[SerializeField] private GameObject labHeartBox;
[SerializeField] private Animator boxPerson;
[SerializeField] private Animator boxPersonDay;
[SerializeField] private GameObject heartContainer;
[SerializeField] GameObject labHeartBox;
[SerializeField] Animator boxPerson;
[SerializeField] Animator boxPersonDay;
[SerializeField] GameObject heartContainer;
[SerializeField] GameObject labGuyFlask;
[SerializeField] GameObject labGirlFlask;
public static List<QueuedFlask> queuedFlask = new List<QueuedFlask>();
@ -170,7 +182,7 @@ namespace HeavenStudio.Games
[Header("Variables")]
public bool hasMissed = false;
private bool canBop = false;
bool canBop = false;
public bool bopRight = false;
public bool isHoldingWhiff = false;
bool isHoldingWhiffAlt = false;
@ -182,12 +194,12 @@ namespace HeavenStudio.Games
public int counter = 0;
bool isLong = false;
int isLongCount = 0;
bool canCloudsMove = true;
[Header("Clouds")]
[SerializeField] GameObject clouds;
public float cloudSpeed;
public float cloudDistance;
[SerializeField] float cloudSpeed;
[SerializeField] float cloudDistance;
[Header("Time Of Day")]
[SerializeField] GameObject sunsetBG;
@ -274,6 +286,54 @@ namespace HeavenStudio.Games
#endregion
#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
{
fastFlask,
@ -310,7 +370,14 @@ namespace HeavenStudio.Games
List<RiqEntity> reqShakeEvents = GetAllFlaskBetween(beat, beat + interval);
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;
@ -319,11 +386,13 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat, delegate
{
//initial shakes
instance.hasMissed = false;
if (autoPassTurn)
{
//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
{
//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;
}
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("Length: " + (beat + length));
//Debug.LogWarning("First Beat: " + firstBeatOfInterval);
//Debug.LogWarning("Last Beat: " + lastBeatOfInterval);
//Debug.LogWarning("Speed Type: " + speedType);
#endregion
BeatAction.New(instance, new List<BeatAction.Action>()
{
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)
{
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)
{
var inputs = GetAllFlaskBetween(intervalBeat, endBeat);
inputs.Sort((x, y) => x.beat.CompareTo(y.beat));
howManyShakes.Add(inputs.Count);
float addDelay = 0f;
inputs[0]["speed"] = inputs[inputs.Count - 1]["speed"];
@ -428,7 +533,7 @@ namespace HeavenStudio.Games
{
addDelay = 0f;
}
else if(inputs[0]["speed"] == 2)
else if (inputs[0]["speed"] == 2)
{
addDelay = .5f;
}
@ -441,20 +546,28 @@ namespace HeavenStudio.Games
{
var input = inputs[i];
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 ((inputs[i].beat + inputs[i].length) >= endBeat)
if(i == 0)
{
ScheduleInput(beat, (length + testBeat) + addDelay, InputAction_DPad, onRelease, onMiss, onEmpty);
ScheduleInput(beat, (length + relativeBeat) + addDelay, InputAction_BasicPress, onCatch, onMiss, onEmpty);
}
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>()
{
new BeatAction.Action(beat, delegate
@ -473,6 +586,7 @@ namespace HeavenStudio.Games
});
}
public static void onCatch(PlayerActionEvent caller, float beat)
{
instance.labGirlHead.Play("GirlIdleFace");
@ -489,15 +603,20 @@ namespace HeavenStudio.Games
SoundByte.PlayOneShotGame("loveLab/shakeDown");
instance.labGirlArm.DoScaledAnimationAsync("ShakeFlaskDown");
}
}
public static void onUpAuto(PlayerActionEvent caller, float beat)
public static void onUp(PlayerActionEvent caller, float beat)
{
SoundByte.PlayOneShotGame("loveLab/shakeUp");
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)
{
instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace");
@ -506,6 +625,8 @@ namespace HeavenStudio.Games
instance.isHolding = false;
instance.hasStartedInterval = false;
//instance.clearShakeList();
instance.spawnFlaskForWeird((caller.startBeat + caller.timer));
var lastCounter = instance.counter;
@ -514,25 +635,20 @@ namespace HeavenStudio.Games
{
new BeatAction.Action((caller.startBeat + caller.timer) + 1f, delegate
{
instance.labGirlHead.Play("GirlIdleFace");
if (instance.labGirlArm.IsAnimationNotPlaying())
{
instance.labGirlArm.DoScaledAnimationAsync("ArmIdle");
}
instance.labGirlIdleState();
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 additionalHearts = 0.063f;
var a = x;
BeatAction.New(instance, new List<BeatAction.Action>()
{
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)
{
var pitchHearts = 0.14f;
SoundByte.PlayOneShotGame("loveLab/bagHeart", pitch: (1f + (pitchHearts * (x))));
SoundByte.PlayOneShotGame("loveLab/bagHeart", pitch: 1f + (pitchHearts * x));
instance.heartBox.DoScaledAnimationAsync("HeartBoxSquish");
}
@ -573,23 +724,28 @@ namespace HeavenStudio.Games
switch (flaskHeart)
{
case 0:
spawnedFlask.FastInit(beat);
spawnedFlask.girlArc(beat, flaskArcToGirl[0]);
break;
case 1:
spawnedFlask.SlowInit(beat);
spawnedFlask.girlArc(beat, flaskArcToGirl[1]);
break;
case 2:
spawnedFlask.MidSlowInit(beat);
spawnedFlask.girlArc(beat, flaskArcToGirl[2]);
break;
}
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>();
spawnedFlask.customShakes(beat);
spawnedFlask.customShakes(beat, reqArc);
}
public void cloudMove(bool canMove)
{
canCloudsMove = canMove;
}
#endregion
@ -643,6 +799,12 @@ namespace HeavenStudio.Games
*
*/
/*
* bops
* check for offbeat bops (auto)
* beat 0 weird bug
*/
[SerializeField] SuperCurveObject.Path[] flaskBouncePath;
public void spotlight(bool active, int whichType, int whichPos)
@ -756,6 +918,14 @@ namespace HeavenStudio.Games
#region IA
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)
{
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
@ -814,6 +984,11 @@ namespace HeavenStudio.Games
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 =
new("NtrLabAlt", new int[] { IAPressCat, IAPressCat, IAPressCat },
IA_PadBasicPress, IA_TouchNrmPress, IA_BatonBasicPress);
@ -850,7 +1025,8 @@ namespace HeavenStudio.Games
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
@ -990,21 +1166,14 @@ namespace HeavenStudio.Games
//}
#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
public void Bop(double beat, float length, bool bop, bool autoBop)
public void Bopping()
{
if (bop)
{
for (int i = 0; i < length; i++)
{
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate
{
if (!bopRight && labGuy.IsAnimationNotPlaying())
if (bopRight && labGuy.IsAnimationNotPlaying())
{
labGuy.DoScaledAnimationAsync("GuyBopRight", .5f);
labGirl.DoScaledAnimationAsync("GirlBopRight", .5f);
@ -1017,6 +1186,19 @@ namespace HeavenStudio.Games
labAssistant.DoScaledAnimationAsync("AssistantBopLeft", .5f);
}
bopRight = !bopRight;
}
public void Bop(double beat, float length, bool bop, bool autoBop)
{
if (bop)
{
for (int i = 0; i < length; i++)
{
var a = i;
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + a, delegate
{
Bopping();
})
});
}
@ -1031,7 +1213,7 @@ namespace HeavenStudio.Games
}
}
public override void OnBeatPulse(double beat)
public override void OnLateBeatPulse(double beat)
{
if (BeatIsInBopRegion(beat)) SingleBop();
}
@ -1045,19 +1227,7 @@ namespace HeavenStudio.Games
{
if (canBop)
{
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;
Bopping();
}
}
@ -1122,39 +1292,6 @@ namespace HeavenStudio.Games
#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.Collections;
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio.Util;
namespace HeavenStudio.Games.Scripts_LoveLab
{
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();
pathStartBeat = beat - 1f;
@ -58,17 +56,12 @@ namespace HeavenStudio.Games.Scripts_LoveLab
{
//SoundByte.PlayOneShot("miss");
//LoveLab.instance.hasMissed = true;
LoveLab.instance.labGuyHead.DoScaledAnimationAsync("GuyFaceIdle");
if (LoveLab.instance.labGuyArm.IsAnimationNotPlaying())
{
LoveLab.instance.labGuyArm.Play("ArmIdle");
}
LoveLab.instance.labGuyIdleState();
//LoveLab.instance.reqHeartsContainer.RemoveAt(0);
Destroy(LoveLab.instance.girlInstantiatedFlask[0].gameObject);
LoveLab.instance.boyFlaskBreak.Play();
LoveLab.instance.playFlaskBreak(0);
LoveLab.instance.girlInstantiatedFlask.RemoveAt(0);
if(LoveLab.instance.reqHeartsContainer.Count > 0)
@ -89,4 +82,3 @@ namespace HeavenStudio.Games.Scripts_LoveLab
}
}
}

View file

@ -1,8 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Starpelly;
using HeavenStudio.Util;
@ -17,19 +15,12 @@ namespace HeavenStudio.Games.Scripts_LoveLab
private Conductor conductor;
public LoveLab.flaskHeart heartType;
void Awake()
{
game = LoveLab.instance;
conductor = Conductor.instance;
}
void Start()
{
}
// Update is called once per frame
void Update()
{
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();
pathStartBeat = beat - 1f;
@ -55,32 +46,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
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)
{
path = game.GetPath("WeirdFlaskIn");
@ -92,21 +57,7 @@ namespace HeavenStudio.Games.Scripts_LoveLab
gameObject.SetActive(true);
BeatAction.New(LoveLab.instance, new List<BeatAction.Action>()
{
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);
}),
});
game.labWeirdEndState(beat, 1f, this.gameObject);
}
@ -124,7 +75,7 @@ namespace HeavenStudio.Games.Scripts_LoveLab
BeatAction.New(game, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate {
game.girlFlaskBreak.Play();
game.playFlaskBreak(1);
Destroy(this.gameObject); })
});
}
@ -136,4 +87,3 @@ namespace HeavenStudio.Games.Scripts_LoveLab
}
}
}

View file

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