Flash now relegated to its own layer

This commit is contained in:
Jenny Crowe
2022-03-07 17:21:27 -07:00
parent 5e99329e1d
commit ad5dd56de3
5 changed files with 5 additions and 3 deletions

View File

@ -62,6 +62,7 @@ namespace RhythmHeavenMania
sp.color = Color.black;
sp.sprite = Resources.Load<Sprite>("Sprites/GeneralPurpose/Square");
sp.sortingOrder = 30000;
gameObject.layer = LayerMask.NameToLayer("Flash");
GameObject fade = new GameObject();
this.fade = fade.AddComponent<Games.Global.Flash>();

View File

@ -27,6 +27,7 @@ namespace RhythmHeavenMania.Games.Global
private void Start()
{
this.gameObject.transform.SetParent(GameManager.instance.gameObject.transform);
gameObject.layer = LayerMask.NameToLayer("Flash");
this.gameObject.transform.localScale = new Vector3(1, 1);
spriteRenderer = this.gameObject.AddComponent<SpriteRenderer>();