Custom Shakes (init)

idk about the rest, some bug fixes and some tweaks
This commit is contained in:
Mytiaoga 2024-02-13 12:55:33 +08:00
parent 46db1f83c5
commit 2b4850104a
8 changed files with 1702 additions and 93 deletions

File diff suppressed because one or more lines are too long

View file

@ -615,10 +615,13 @@ MonoBehaviour:
scheduledInputs: []
labGuy: {fileID: 2166375559639248018}
labGuyHead: {fileID: 2213739574016045658}
labGuyArm: {fileID: 6425664033193447254}
labGirl: {fileID: 2679407609467283902}
labGirlHead: {fileID: 3393587621863104861}
labGirlArm: {fileID: 2801754847648881029}
labAssistant: {fileID: 4557519451044364801}
labAssistantHead: {fileID: 7230862986891120656}
labAssistantArm: {fileID: 8475969050307686821}
flask: {fileID: 0}
labFlaskObj: {fileID: 6033749656558512970, guid: 95f2093cb48221e4fa1961a03fdcffee, type: 3}
labGirlFlaskObj: {fileID: 6033749656558512970, guid: 7509505865426904dbc2986ec719a8d7, type: 3}
@ -639,14 +642,12 @@ MonoBehaviour:
spotlightCone: {fileID: 5070524962511805796}
labHeartBox: {fileID: 2938495750069376480}
boxPerson: {fileID: 7654582273108844636}
boxPersonDay: {fileID: 7488400320160201047}
heartContainer: {fileID: 2687961951367931963, guid: eba582805738b7444ab4244c59409871, type: 3}
labGuyFlask: {fileID: 7024684491928204742}
labGirlFlask: {fileID: 344072480916160056}
girlInstantiatedFlask: []
weirdInstantiatedFlask: []
labGuyArm: {fileID: 6425664033193447254}
labGuyFlask: {fileID: 7024684491928204742}
labGirlArm: {fileID: 2801754847648881029}
labGirlFlask: {fileID: 344072480916160056}
labAssistantArm: {fileID: 8475969050307686821}
hasMissed: 0
bopRight: 0
isHoldingWhiff: 0
@ -686,7 +687,7 @@ MonoBehaviour:
- key: rot
value: 0
- name: GirlFastFlaskIn
preview: 1
preview: 0
anchor: {fileID: 0}
positions:
- tag:
@ -752,7 +753,7 @@ MonoBehaviour:
- key: rot
value: 0
- name: GirlFlaskMiss
preview: 1
preview: 0
anchor: {fileID: 0}
positions:
- tag:
@ -6748,8 +6749,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1206791551451555203}
m_LocalRotation: {x: -0, y: -0, z: -0.6427876, w: 0.7660445}
m_LocalPosition: {x: 4, y: 1.94, z: 0}
m_LocalScale: {x: 18.414345, y: 10.451385, z: 9.9537}
m_LocalPosition: {x: 24, y: 2, z: 0}
m_LocalScale: {x: 50, y: 50, z: 0}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 930037580571553143}
@ -7298,8 +7299,8 @@ Transform:
m_GameObject: {fileID: 1612937315996693382}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 18.414345, y: 10.451385, z: 9.9537}
m_ConstrainProportionsScale: 0
m_LocalScale: {x: 50, y: 50, z: 50}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 4352296737110256235}
m_RootOrder: 0
@ -10112,8 +10113,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3976450293214606469}
m_LocalRotation: {x: -0, y: -0, z: 0.6427876, w: 0.7660445}
m_LocalPosition: {x: -11, y: 1.94, z: 0}
m_LocalScale: {x: 18.414345, y: 10.451385, z: 9.9537}
m_LocalPosition: {x: -31.5, y: 2, z: 0}
m_LocalScale: {x: 50, y: 50, z: 0}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 930037580571553143}
@ -10243,7 +10244,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2000
m_SortingOrder: 2001
m_Sprite: {fileID: -134353524, guid: 32b8969086bedeb45b1cb9a4a9c5cddb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@ -12120,8 +12121,8 @@ Transform:
m_GameObject: {fileID: 5626236978170321824}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 18.414345, y: 10.451385, z: 9.9537}
m_ConstrainProportionsScale: 0
m_LocalScale: {x: 50, y: 50, z: 50}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 863251278291212039}
m_RootOrder: 0

View file

@ -83,6 +83,6 @@ Material:
- _ZWrite: 1
m_Colors:
- _AddColor: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 0.9528302, g: 0.87130237, b: 0.7775454, a: 1}
- _Color: {r: 0.9529412, g: 0.87058824, b: 0.7764706, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View file

@ -3268,6 +3268,10 @@ PrefabInstance:
propertyPath: m_Name
value: Cursor
objectReference: {fileID: 0}
- target: {fileID: 285182280367868641, guid: 81ce52789acca4440804eb938de70425, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 285182280367868644, guid: 81ce52789acca4440804eb938de70425, type: 3}
propertyPath: m_RootOrder
value: 9
@ -14029,7 +14033,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 171581557}
m_HandleRect: {fileID: 171581556}
m_Direction: 2
m_Value: 1
m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
@ -18390,6 +18394,10 @@ PrefabInstance:
propertyPath: m_Name
value: CamerasEditor
objectReference: {fileID: 0}
- target: {fileID: 6052331674888157615, guid: 720073bc7682b1441bece7116681f72c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6136050241491700490, guid: 720073bc7682b1441bece7116681f72c, type: 3}
propertyPath: m_RaycastTarget
value: 0
@ -26851,7 +26859,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1589389271}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Size: 0.9995103
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@ -32707,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: 109.67346}
m_AnchoredPosition: {x: 0, y: 108.85712}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1154875945
@ -43456,7 +43464,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1220118244}
m_Direction: 2
m_Value: 1.0000004
m_Size: 0.5104374
m_Size: 0.50367343
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

View file

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

View file

@ -50,6 +50,7 @@ namespace HeavenStudio.Games.Loaders
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")
@ -74,7 +75,30 @@ namespace HeavenStudio.Games.Loaders
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")
{
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")
@ -132,14 +156,17 @@ namespace HeavenStudio.Games
[Header("Lab Guy")]
[SerializeField] private GameObject labGuy;
public Animator labGuyHead;
public GameObject labGuyArm;
[Header("Lab Girl")]
[SerializeField] private GameObject labGirl;
public Animator labGirlHead;
public GameObject labGirlArm;
[Header("Lab Weird")]
[SerializeField] private GameObject labAssistant;
[SerializeField] private Animator labAssistantHead;
public GameObject labAssistantArm;
[Header("Flask")]
public GameObject flask;
@ -167,20 +194,15 @@ namespace HeavenStudio.Games
[SerializeField] GameObject spotlightCone;
[SerializeField] private GameObject labHeartBox;
[SerializeField] private Animator boxPerson;
[SerializeField] private Animator boxPersonDay;
[SerializeField] private GameObject heartContainer;
[SerializeField] GameObject labGuyFlask;
[SerializeField] GameObject labGirlFlask;
public static List<QueuedFlask> queuedFlask = new List<QueuedFlask>();
//public List<GameObject> boyInstantiatedFlask = new List<GameObject>(); //blank to boy
public List<LoveLabForGirlFlask> girlInstantiatedFlask = new List<LoveLabForGirlFlask>(); //boy to girl
public List<LoveLabForGirlFlask> weirdInstantiatedFlask = new List<LoveLabForGirlFlask>(); //girl to weird
[Header("Arms")]
public GameObject labGuyArm;
[SerializeField] GameObject labGuyFlask;
public GameObject labGirlArm;
[SerializeField] GameObject labGirlFlask;
public GameObject labAssistantArm;
[Header("Variables")]
public bool hasMissed = false;
private bool canBop = false;
@ -189,6 +211,10 @@ namespace HeavenStudio.Games
bool isHoldingWhiffAlt = false;
bool isHoldingWhiffPressed = false;
public bool canCallForFlask = true;
bool isDay = false;
bool hasStartedInterval;
bool isHolding;
int counter;
[Header("Clouds")]
@ -206,6 +232,9 @@ namespace HeavenStudio.Games
[SerializeField] Material weirdShader;
[SerializeField] GameObject weirdHeaderShader;
//[Header("Hearts")]
//public List<Sprite> warningSprites = new List<Sprite>();
#region time of day
public enum timeOfDay
@ -239,6 +268,8 @@ namespace HeavenStudio.Games
weirdShader.SetColor("_ColorDelta", new Color(0.8941177f, 0.1882353f, 0f)); // E43000
weirdHeaderShader.SetActive(true);
isDay = false;
}
public void setTimeOfDay(int tod)
@ -269,13 +300,293 @@ namespace HeavenStudio.Games
weirdShader.SetColor("_ColorDelta", new Color(0.9686275f, 0.3803922f, 0.03137255f)); // F76108
weirdHeaderShader.SetActive(false);
isDay = true;
}
}
#endregion
//normal spotlight when someone grabs on it -> 5f the distance
#region intervals
public enum throwFlaskSpeedType
{
fastFlask,
slowFlask,
midSlowFlask
}
private struct queuedInterval
{
public double beat;
public float interval;
public bool autoPassTurn;
}
private static List<queuedInterval> queuedIntervals = new List<queuedInterval>();
public static void PreInterval(double beat, float interval, bool autoPassTurn)
{
if (GameManager.instance.currentGame == "loveLab")
{
instance.SetIntervalStart(beat, interval, beat, autoPassTurn);
}
else
{
queuedIntervals.Add(new queuedInterval
{
beat = beat,
interval = interval,
autoPassTurn = autoPassTurn
});
}
}
private void SetIntervalStart(double beat, float interval, double gameSwitchBeat, bool autoPassTurn)
{
List<RiqEntity> reqShakeEvents = GetAllSpeaksInBetweenBeat(beat, beat + interval);
reqShakeEvents.Sort((x, y) => x.beat.CompareTo(y.beat));
List<BeatAction.Action> queuedFlasks = new()
{
new BeatAction.Action(beat, delegate
{
//initial shakes
if (autoPassTurn)
{
//pass to girl
BoyPassToGirl(beat + interval, beat, beat + interval, 1, reqShakeEvents.Count);
}
})
};
for (int i = 0; i < reqShakeEvents.Count; i++)
{
RiqEntity shakeEventToCheck = reqShakeEvents[i];
if (shakeEventToCheck.beat >= gameSwitchBeat)
{
queuedFlasks.Add(new BeatAction.Action(shakeEventToCheck.beat, delegate
{
//lab boy shake
boyShake(shakeEventToCheck.beat, shakeEventToCheck.length, beat, beat + interval, shakeEventToCheck["speed"]);
}));
}
}
BeatAction.New(this, queuedFlasks);
}
private List<RiqEntity> GetAllSpeaksInBetweenBeat(double beat, double endBeat)
{
List<RiqEntity> speakEvents = EventCaller.GetAllInGameManagerList("loveLab", new string[] { "boy shakes" });
List<RiqEntity> tempEvents = new();
foreach (var entity in speakEvents)
{
if (entity.beat >= beat && entity.beat < endBeat)
{
tempEvents.Add(entity);
}
}
return tempEvents;
}
private void boyShake(double beat, double length, double firstBeatOfInterval, double lastBeatOfInterval, int speedType)
{
//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);
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate {
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);
labGuyArm.GetComponent<Animator>().Play("GrabFlask");
hasStartedInterval = true;
spawnCustomFlask(beat);
}
else if(beat > firstBeatOfInterval)
{
SoundByte.PlayOneShotGame("loveLab/shakeDown");
labGuyArm.GetComponent<Animator>().Play("ShakeFlaskDown");
}
}),
new BeatAction.Action(beat + length, delegate {
if(lastBeatOfInterval > beat + length)
{
SoundByte.PlayOneShotGame("loveLab/shakeUp");
labGuyArm.GetComponent<Animator>().Play("ShakeFlaskUp");
}
else
{
SoundByte.PlayOneShotGame("loveLab/leftThrow");
labGuyArm.GetComponent<Animator>().Play("ThrowFlask");
spawnFlaskForGirlCustom((beat + length) + 1f, speedType);
}
}),
});
}
private void BoyPassToGirl(double beat, double intervalBeat, double endBeat, float length, int counter)
{
var inputs = GetAllSpeaksInBetweenBeat(intervalBeat, endBeat);
inputs.Sort((x, y) => x.beat.CompareTo(y.beat));
this.counter = counter;
for (int i = 0; i < inputs.Count; i++)
{
var input = inputs[i];
double relativeBeat = input.beat - 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, 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)
{
ScheduleInput(beat, (length + testBeat), InputAction_DPad, onRelease, onMiss, onEmpty);
}
else
{
ScheduleAutoplayInput(beat, (length + testBeat), InputAction_DPad, onUpAuto, onMiss, onEmpty);
}
}
BeatAction.New(this, new List<BeatAction.Action>()
{
new BeatAction.Action(beat, delegate
{
hasMissed = false;
}),
new BeatAction.Action(endBeat + 1f, delegate
{
labGuyHead.Play("GuyFaceIdle");
if (labGuyArm.GetComponent<Animator>().IsAnimationNotPlaying())
{
labGuyArm.GetComponent<Animator>().Play("ArmIdle");
}
})
});
}
public static void onCatch(PlayerActionEvent caller, float beat)
{
instance.labGirlHead.Play("GirlIdleFace");
if (!instance.isHolding)
{
instance.isHolding = true;
SoundByte.PlayOneShotGame("loveLab/RightCatch");
instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("GrabFlask");
LoveLab.instance.girlInstantiatedFlask[0].GetComponent<LoveLabForGirlFlask>().destroyThisObj();
}
else if(instance.counter > 1 && instance.isHolding)
{
SoundByte.PlayOneShotGame("loveLab/shakeDown");
instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ShakeFlaskDown");
}
}
public static void onUpAuto(PlayerActionEvent caller, float beat)
{
SoundByte.PlayOneShotGame("loveLab/shakeUp");
instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ShakeFlaskUp");
}
public static void onRelease(PlayerActionEvent caller, float beat)
{
instance.labGirlHead.DoScaledAnimationAsync("GirlIdleFace");
SoundByte.PlayOneShotGame("loveLab/rightThrowNoShake");
instance.labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ThrowFlask");
BeatAction.New(instance, new List<BeatAction.Action>()
{
new BeatAction.Action((caller.startBeat + caller.timer) + 1f, delegate
{
instance.labGirlHead.Play("GirlIdleFace");
if (instance.labGirlArm.GetComponent<Animator>().IsAnimationNotPlaying())
{
instance.labGirlArm.GetComponent<Animator>().Play("ArmIdle");
}
})
});
}
public void onDownFlaskCustom()
{
SoundByte.PlayOneShotGame("loveLab/shakeDown");
labGirlArm.GetComponent<Animator>().DoScaledAnimationAsync("ShakeFlaskDown");
}
public void spawnFlaskForGirlCustom(double beat, int flaskHeart) //boy to girl
{
//flaskMatForBoy.SetColor("_ColorAlpha", instance.boyLiquidColor);
LoveLabForGirlFlask spawnedFlask = Instantiate(labFlaskObj, instance.transform).AddComponent<LoveLabForGirlFlask>();
switch (flaskHeart)
{
case 0:
spawnedFlask.FastInit(beat);
break;
case 1:
spawnedFlask.SlowInit(beat);
break;
case 2:
spawnedFlask.MidSlowInit(beat);
break;
}
girlInstantiatedFlask.Add(spawnedFlask.GetComponent<LoveLabForGirlFlask>());
}
public void spawnCustomFlask(double beat) //wall to boy
{
LoveLabFlask spawnedFlask = Instantiate(labFlaskObj, instance.transform).AddComponent<LoveLabFlask>();
spawnedFlask.customShakes(beat);
}
#endregion
//make a smooth transition to day to sunset and vice versa
/*
* would be nice if there were visual warnings for the next game
* head of dj and student for the hearts
* balls of munchy monk
* fruits for catchy tune
* balls for double date
* pots for karate man
* shuttlecock for air rally
* farmer head for second contact
* etc.
*
*/
/*
* lovelabflask script
* ask for how many flask
@ -306,18 +617,6 @@ namespace HeavenStudio.Games
[SerializeField] SuperCurveObject.Path[] flaskBouncePath;
//public void spotlight(bool active)
//{
// if(active == true)
// {
// spotlightShader.SetActive(true);
// }
// else
// {
// spotlightShader.SetActive(false);
// }
//}
public void spotlight(bool active, int whichType, int whichPos)
{
if(active == true)
@ -386,29 +685,29 @@ namespace HeavenStudio.Games
private void OnDestroy()
{
preChecks(0f);
//preChecks(0f);
queuedFlask.Clear();
destroyAllFlasks();
//destroyAllFlasks();
foreach (var evt in scheduledInputs)
{
evt.Disable();
}
}
private void destroyAllFlasks()
{
foreach(LoveLabForGirlFlask girl in girlInstantiatedFlask)
{
Destroy(girl);
}
girlInstantiatedFlask.Clear();
//private void destroyAllFlasks()
//{
// foreach(LoveLabForGirlFlask girl in girlInstantiatedFlask)
// {
// Destroy(girl);
// }
// girlInstantiatedFlask.Clear();
foreach (LoveLabForGirlFlask weird in weirdInstantiatedFlask)
{
Destroy(weird);
}
weirdInstantiatedFlask.Clear();
}
// foreach (LoveLabForGirlFlask weird in weirdInstantiatedFlask)
// {
// Destroy(weird);
// }
// weirdInstantiatedFlask.Clear();
//}
void preChecks(double beat)
{
@ -581,7 +880,7 @@ namespace HeavenStudio.Games
fiveHeart
}
public struct QueuedFlask
public struct QueuedFlask //for the offscreen stuff
{
public double beat;
public flaskHeart type;
@ -861,22 +1160,33 @@ namespace HeavenStudio.Games
public void mainBoxGuy(double beat, int reqAction)
{
Animator box;
if (!isDay)
{
box = boxPerson;
}
else
{
box = boxPersonDay;
}
switch (reqAction)
{
case 0:
boxPerson.DoScaledAnimationAsync("BoxTakeAway", .5f);
box.DoScaledAnimationAsync("BoxTakeAway", .5f);
break;
case 1:
boxPerson.DoScaledAnimationAsync("BoxPutBack", .5f);
box.DoScaledAnimationAsync("BoxPutBack", .5f);
break;
case 2:
boxPerson.DoScaledAnimationAsync("NoBox", 0f);
box.DoScaledAnimationAsync("NoBox", 0f);
break;
case 3:
boxPerson.DoScaledAnimationAsync("BoxIdle", 0f);
box.DoScaledAnimationAsync("BoxIdle", 0f);
break;
default:
boxPerson.DoScaledAnimationAsync("BoxTakeAway", .5f);
box.DoScaledAnimationAsync("BoxTakeAway", .5f);
break;
}
}
@ -1104,7 +1414,7 @@ namespace HeavenStudio.Games
new BeatAction.Action((caller.startBeat + caller.timer) + .25f, delegate { instance.onDownFlask(); })
});
if(instance.reqHeartsContainer[0].heartCounter > 0)
if (instance.reqHeartsContainer[0].heartCounter > 0)
{
if (instance.reqHeartsContainer[0].heartType == flaskHeart.twoHeart)
{
@ -1113,7 +1423,6 @@ namespace HeavenStudio.Games
heartDetails heart = instance.reqHeartsContainer[0];
heart.heartCounter--;
instance.reqHeartsContainer[0] = heart;
}
else if (instance.reqHeartsContainer[0].heartType == flaskHeart.threeHeart)
@ -1152,7 +1461,7 @@ namespace HeavenStudio.Games
}
}
if(instance.reqHeartsContainer[0].heartCounter <= 0)
if (instance.reqHeartsContainer[0].heartCounter <= 0)
{
instance.reqHeartsContainer.RemoveAt(0);
}
@ -1192,12 +1501,17 @@ namespace HeavenStudio.Games
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);
}

View file

@ -14,8 +14,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
[SerializeField] private SuperCurveObject.Path path;
private double pathStartBeat = double.MinValue;
private Conductor conductor;
public static double currentBeat;
void Awake()
{
@ -41,6 +39,26 @@ namespace HeavenStudio.Games.Scripts_LoveLab
}
}
public void customShakes(double beat)
{
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
Vector3 pos = GetPathPositionFromBeat(path, pathStartBeat, pathStartBeat);
transform.position = pos;
gameObject.SetActive(true);
BeatAction.New(game, new List<BeatAction.Action>
{
new BeatAction.Action(beat, delegate
{
Destroy(this.gameObject);
}),
});
}
#region 1 heart
public void Init(double beat)
{
@ -49,7 +67,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
//game.canCallForFlask = false;
game.ScheduleInput(beat, 2f, LoveLab.InputAction_BasicPressing, onOneCatch, onMiss, onEmpty);
currentBeat = beat;
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
@ -114,7 +131,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
//game.canCallForFlask = false;
game.ScheduleInput(beat, 2f, LoveLab.InputAction_BasicPressing, onOneOffCatch, onMiss, onEmpty);
currentBeat = beat;
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
@ -175,7 +191,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
game.ScheduleInput(beat, 2f, LoveLab.InputAction_BasicPressing, onTwoCatch, onMiss, onEmpty);
currentBeat = beat;
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
@ -220,7 +235,7 @@ namespace HeavenStudio.Games.Scripts_LoveLab
LoveLab.heartDetails heart = new LoveLab.heartDetails();
heart.heartCounter = 1;
heart.heartType = LoveLab.flaskHeart.twoHeart;
Debug.LogWarning("counter: " + heart.heartCounter);
game.reqHeartsContainer.Add(heart);
}
@ -253,7 +268,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
game.ScheduleInput(beat, 4f, LoveLab.InputAction_BasicPressing, onThreeCatch, onMiss, onEmpty);
currentBeat = beat;
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
@ -357,7 +371,6 @@ namespace HeavenStudio.Games.Scripts_LoveLab
game.ScheduleInput(beat, 4f, LoveLab.InputAction_BasicPressing, onFiveCatch, onMiss, onEmpty);
currentBeat = beat;
path = game.GetPath("GuyFlaskIn");
UpdateLastRealPos();
pathStartBeat = beat - 1f;
@ -483,8 +496,12 @@ namespace HeavenStudio.Games.Scripts_LoveLab
Destroy(LoveLab.instance.girlInstantiatedFlask[0].gameObject);
LoveLab.instance.boyFlaskBreak.Play();
LoveLab.instance.girlInstantiatedFlask.RemoveAt(0);
if(LoveLab.instance.reqHeartsContainer.Count > 0)
{
LoveLab.instance.reqHeartsContainer.RemoveAt(0);
}
}
public static void onMissWhenHold(PlayerActionEvent caller)
{

View file

@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 1.0.2
bundleVersion: 1.0.9
preloadedAssets:
- {fileID: 102900000, guid: 5348c08b82446e0478cee8bda6c02cfc, type: 3}
metroInputSource: 0
@ -158,11 +158,11 @@ PlayerSettings:
applicationIdentifier:
Standalone: com.RHeavenStudio.Heaven-Studio
buildNumber:
Standalone: 100002
Standalone: 100009
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 100002
AndroidBundleVersionCode: 100009
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
@ -408,6 +408,9 @@ PlayerSettings:
- m_BuildTarget: iOSSupport
m_APIs: 10000000
m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 02000000
m_Automatic: 1
m_BuildTargetVRSettings: []
m_DefaultShaderChunkSizeInMB: 16
m_DefaultShaderChunkCount: 0