add hit effects
fix jank with shuttle movement
This commit is contained in:
parent
3c37d450f1
commit
a10abf955d
File diff suppressed because it is too large
Load diff
|
@ -40,7 +40,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
},
|
||||
new GameAction("ba bum bum bum", "Ba Bum Bum Bum")
|
||||
{
|
||||
function = delegate { AirRally.instance.SetDistance(e.currentEntity["type"]); AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity["toggle"], e.currentEntity["type"]); },
|
||||
function = delegate { AirRally.instance.BaBumBumBum(e.currentEntity.beat, e.currentEntity["toggle"], e.currentEntity["type"]); },
|
||||
defaultLength = 7f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
|
@ -93,13 +93,6 @@ namespace HeavenStudio.Games
|
|||
[Header("Waypoint")]
|
||||
public float wayPointZForForth;
|
||||
|
||||
[Header("Curves")]
|
||||
public BezierCurve3D closeRallyCurve;
|
||||
public BezierCurve3D farRallyCurve;
|
||||
public BezierCurve3D fartherRallyCurve;
|
||||
public BezierCurve3D farthestRallyCurve;
|
||||
public BezierCurve3D closeRallyReturnCurve;
|
||||
|
||||
[Header("Debug")]
|
||||
public float beatShown;
|
||||
public float lengthHolder;
|
||||
|
@ -185,6 +178,8 @@ namespace HeavenStudio.Games
|
|||
shuttleScript.flyType = type;
|
||||
|
||||
shuttleActive = true;
|
||||
|
||||
Forthington.GetComponent<Animator>().Play("Hit");
|
||||
}
|
||||
|
||||
public void ReturnObject(float beat, float targetBeat, bool type)
|
||||
|
@ -330,8 +325,6 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
//new BeatAction.Action(beat, delegate { Forthington.GetComponent<Animator>().Play("Ready");} ),
|
||||
new BeatAction.Action(beat, delegate { Forthington.GetComponent<Animator>().Play("Hit");} ),
|
||||
new BeatAction.Action(beat, delegate { ServeObject(beat, beat + 1, false); } ),
|
||||
});
|
||||
|
||||
|
@ -476,13 +469,13 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.5f, delegate { SetDistance(type, false); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { Forthington.GetComponent<Animator>().Play("Ready"); }),
|
||||
new BeatAction.Action(beat + 2.5f, delegate { if(babum) { Forthington.GetComponent<Animator>().Play("Hit"); } }),
|
||||
new BeatAction.Action(beat + 2.5f, delegate { ServeObject(beat + 2.5f, beat + 4.5f, true); } ),
|
||||
new BeatAction.Action(beat + 3.5f, delegate { Forthington.GetComponent<Animator>().Play("TalkShort"); }),
|
||||
new BeatAction.Action(beat + 4f, delegate { if(!count) Forthington.GetComponent<Animator>().Play("TalkShort"); }),
|
||||
new BeatAction.Action(beat + 4.5f, delegate { Forthington.GetComponent<Animator>().Play("Ready"); }),
|
||||
new BeatAction.Action(beat + 7f, delegate { if(babum) { babum = false; } }),
|
||||
new BeatAction.Action(beat + 5.5f, delegate { if(babum) { babum = false; } }),
|
||||
});
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
|
@ -527,6 +520,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
ReturnObject(Conductor.instance.songPositionInBeats, caller.startBeat + caller.timer + 1f, false);
|
||||
hasMissed = false;
|
||||
ActiveShuttle.GetComponent<Shuttlecock>().DoHit(e_BaBumState);
|
||||
|
||||
if (e_BaBumState == DistanceSound.close)
|
||||
{
|
||||
|
@ -562,6 +556,7 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
ReturnObject(Conductor.instance.songPositionInBeats, caller.startBeat + caller.timer + 2f, true);
|
||||
hasMissed = false;
|
||||
ActiveShuttle.GetComponent<Shuttlecock>().DoHit(e_BaBumState);
|
||||
|
||||
if (e_BaBumState == DistanceSound.close)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace HeavenStudio.Games.Scripts_AirRally
|
|||
[SerializeField] Transform OtherTarget;
|
||||
[SerializeField] float TargetHeight;
|
||||
[SerializeField] float TargetHeightLong;
|
||||
[SerializeField] ParticleSystem hitEffect;
|
||||
|
||||
public float startBeat;
|
||||
public float flyBeats;
|
||||
|
@ -67,6 +68,27 @@ namespace HeavenStudio.Games.Scripts_AirRally
|
|||
}
|
||||
}
|
||||
|
||||
public void DoHit(AirRally.DistanceSound distance)
|
||||
{
|
||||
ParticleSystem.MainModule main = hitEffect.main;
|
||||
switch (distance)
|
||||
{
|
||||
case AirRally.DistanceSound.close:
|
||||
main.startSize = 2f;
|
||||
break;
|
||||
case AirRally.DistanceSound.far:
|
||||
main.startSize = 3f;
|
||||
break;
|
||||
case AirRally.DistanceSound.farther:
|
||||
main.startSize = 4f;
|
||||
break;
|
||||
case AirRally.DistanceSound.farthest:
|
||||
main.startSize = 6f;
|
||||
break;
|
||||
}
|
||||
hitEffect.Play();
|
||||
}
|
||||
|
||||
public void DoNearMiss()
|
||||
{
|
||||
miss = true;
|
||||
|
|
Loading…
Reference in a new issue