using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(fileName="SSD", menuName="Sprite Sorter Data", order = 1)]
public class SpriteSorterData : ScriptableObject {
    public float posToSortRatio = 0.1f;
    public int orderMultiplier = 10;

    int buf;
    public int GetOrder(Transform transf) {
        buf = -(int) (transf.position.z * posToSortRatio) * orderMultiplier;
        //Debug.Log("Getting order : " + transf.position.z + " " + posToSortRatio + " " + orderMultiplier + " buf : " + buf);
        return buf;
    }
}
