mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-29 18:34:19 +00:00
19 lines
406 B
C#
19 lines
406 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class DepthFromY : MonoBehaviour {
|
|||
|
|
|||
|
private SpriteRenderer spriteRenderer;
|
|||
|
|
|||
|
void Start () {
|
|||
|
spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
|
|||
|
spriteRenderer.sortingOrder = Mathf.CeilToInt(-transform.position.y * 100);
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update () {
|
|||
|
|
|||
|
}
|
|||
|
}
|