mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-30 05:23:06 +00:00
Trick on the Class: prep bop entity
This commit is contained in:
parent
d102d1baa2
commit
8f905535ba
4 changed files with 27 additions and 10 deletions
|
@ -2166,8 +2166,8 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
curve: {fileID: 6309335202182677863}
|
||||
handleType: 0
|
||||
leftHandleLocalPosition: {x: -0.37190485, y: -1.4919753, z: 0}
|
||||
rightHandleLocalPosition: {x: 0.37190485, y: 1.4919753, z: -0}
|
||||
leftHandleLocalPosition: {x: -0.45885086, y: -1.7927861, z: 0.031735867}
|
||||
rightHandleLocalPosition: {x: 0.45885086, y: 1.7927861, z: -0.031735867}
|
||||
--- !u!1 &8162409257639345853
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2240,7 +2240,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8303722412302536607}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 4.779551, y: 6.4797254, z: 0}
|
||||
m_LocalPosition: {x: 3.7576966, y: 6.2020583, z: 0.3722403}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 270213282485315182}
|
||||
|
@ -2260,8 +2260,8 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
curve: {fileID: 6309335202182677863}
|
||||
handleType: 0
|
||||
leftHandleLocalPosition: {x: 0.804543, y: 1.8257971, z: -0}
|
||||
rightHandleLocalPosition: {x: -0.804543, y: -1.8257971, z: 0}
|
||||
leftHandleLocalPosition: {x: 0.8479717, y: 1.2241788, z: -0.015987754}
|
||||
rightHandleLocalPosition: {x: -0.8479717, y: -1.2241788, z: 0.015987754}
|
||||
--- !u!1 &8432671419974842299
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
|||
public bool flyType;
|
||||
public float startBeat;
|
||||
bool flying = true;
|
||||
bool hit = false;
|
||||
bool dodged = false;
|
||||
bool miss = false;
|
||||
|
||||
float flyBeats;
|
||||
|
@ -80,7 +80,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
|||
}
|
||||
}
|
||||
|
||||
if (!(hit || miss))
|
||||
if (!(dodged || miss))
|
||||
{
|
||||
float normalizedBeat = cond.GetPositionFromMargin(startBeat + dodgeBeats, 1f);
|
||||
StateCheck(normalizedBeat);
|
||||
|
@ -89,7 +89,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
|||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
hit = true;
|
||||
dodged = true;
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound("trickClass/ball_impact", startBeat + flyBeats, volume: 0.75f),
|
||||
});
|
||||
|
@ -108,7 +108,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
|||
break;
|
||||
default:
|
||||
curve = TrickClass.instance.ballMissCurve;
|
||||
flyBeats = 1.5f;
|
||||
flyBeats = 1.25f;
|
||||
break;
|
||||
}
|
||||
startBeat += dodgeBeats;
|
||||
|
@ -120,7 +120,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
|||
public override void OnAce()
|
||||
{
|
||||
TrickClass.instance.PlayerDodge();
|
||||
hit = true;
|
||||
dodged = true;
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound("trickClass/ball_impact", startBeat + flyBeats, volume: 0.5f),
|
||||
});
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace HeavenStudio.Games
|
|||
public BezierCurve3D shockTossCurve;
|
||||
|
||||
public static TrickClass instance;
|
||||
public GameEvent bop = new GameEvent();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
@ -45,12 +46,27 @@ namespace HeavenStudio.Games
|
|||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (cond.songPositionInBeats >= bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length)
|
||||
{
|
||||
//TODO: bop animation
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
PlayerDodge();
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length)
|
||||
{
|
||||
bop.startBeat = beat;
|
||||
bop.length = length;
|
||||
}
|
||||
|
||||
public void TossObject(float beat, int type)
|
||||
{
|
||||
switch (type)
|
||||
|
|
|
@ -464,6 +464,7 @@ namespace HeavenStudio
|
|||
}),
|
||||
new Minigame("trickClass", "Trick on the Class\n<color=#eb5454>[WIP don't use]</color>", "C0171D", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("bop", delegate { var e = eventCaller.currentEntity; TrickClass.instance.Bop(e.beat, e.length); }, 1, true),
|
||||
new GameAction("toss", delegate
|
||||
{
|
||||
TrickClass.instance.TossObject(eventCaller.currentEntity.beat, eventCaller.currentEntity.type);
|
||||
|
|
Loading…
Reference in a new issue