mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:17:37 +02:00
Merge pull request #40 from CarsonKompon/wizards-waltz-more
Wizard's Waltz - New SFX and better FOV
This commit is contained in:
@ -15,6 +15,8 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
private bool hit = false;
|
||||
private bool passed = false;
|
||||
|
||||
public int order = 0;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
game = WizardsWaltz.instance;
|
||||
@ -22,7 +24,7 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
|
||||
private void Start()
|
||||
{
|
||||
spriteRenderer.sortingOrder = (int)Math.Round((transform.position.z - 2) * 1000);
|
||||
spriteRenderer.sortingOrder = order;
|
||||
animator.Play("Appear", 0, 0);
|
||||
}
|
||||
|
||||
|
@ -26,11 +26,11 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
songPos = Conductor.instance.songPositionInBeats;
|
||||
var am = game.beatInterval / 2f;
|
||||
var x = Mathf.Sin(Mathf.PI * songPos / am) * 6;
|
||||
var y = Mathf.Cos(Mathf.PI * songPos / am) * 2f;
|
||||
var y = Mathf.Cos(Mathf.PI * songPos / am) * 1.5f;
|
||||
var scale = 1 - Mathf.Cos(Mathf.PI * songPos / am) * 0.35f;
|
||||
|
||||
transform.position = new Vector3(x, 1f + y, scale * 2);
|
||||
shadow.transform.position = new Vector3(x, -3.5f + y, scale * 2 + 0.1f);
|
||||
transform.position = new Vector3(x, 1.5f + y, 0);
|
||||
shadow.transform.position = new Vector3(x, -3f + y, 0);
|
||||
|
||||
var xscale = scale;
|
||||
if (y > 0) xscale *= -1;
|
||||
@ -43,6 +43,7 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
if (PlayerInput.Pressed(true))
|
||||
{
|
||||
animator.Play("Magic", 0, 0);
|
||||
Jukebox.PlayOneShotGame("wizardsWaltz/wand");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
|
||||
MagicFX magic = Instantiate(fxBase, fxHolder.transform).GetComponent<MagicFX>();
|
||||
|
||||
magic.transform.position = new Vector3(x, 0.5f + y, scale * 2);
|
||||
magic.transform.position = new Vector3(x, 0.5f + y, 0);
|
||||
magic.transform.localScale = wizard.gameObject.transform.localScale;
|
||||
magic.gameObject.SetActive(true);
|
||||
}
|
||||
@ -86,14 +86,15 @@ namespace RhythmHeavenMania.Games.WizardsWaltz
|
||||
var songPos = Conductor.instance.songPositionInBeats;
|
||||
var am = (beatInterval / 2f);
|
||||
var x = Mathf.Sin(Mathf.PI * songPos / am) * 6;
|
||||
var y = -3.5f + Mathf.Cos(Mathf.PI * songPos / am) * 2f;
|
||||
var y = -3f + Mathf.Cos(Mathf.PI * songPos / am) * 1.5f;
|
||||
var scale = 1 - Mathf.Cos(Mathf.PI * songPos / am) * 0.35f;
|
||||
var xscale = scale;
|
||||
if (y > -3.5f) xscale *= -1;
|
||||
|
||||
plant.transform.localPosition = new Vector3(x, y, scale * 2);
|
||||
plant.transform.localPosition = new Vector3(x, y, 0);
|
||||
plant.transform.localScale = new Vector3(xscale, scale, 1);
|
||||
|
||||
plant.order = (int)Math.Round((scale - 1) * 1000);
|
||||
plant.gameObject.SetActive(true);
|
||||
|
||||
plant.createBeat = beat;
|
||||
|
Reference in New Issue
Block a user