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

public class Chair : MonoBehaviour {

    SpriteRenderer bench;
	// Use this for initialization
	void Start () {
        bench = GetComponent<SpriteRenderer>(); 
        bench.sortingOrder -= (int)(transform.position.z * 10);

        float colorScale = (35 - transform.position.z) / 20;
        this.bench.color = new Color(colorScale, colorScale, colorScale);
    }
	
	// Update is called once per frame
	void Update () {
		
	}
}
