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

public class CheeseScript : MonoBehaviour {

    float life;

	// Use this for initialization
	void Start () {
        life = 9f;
	}
	
	// Update is called once per frame
	void Update () {
                life -= Time.deltaTime;
                Vector3 sc = this.transform.localScale;
                float fac = (100f - 10f*Time.deltaTime) / 100f;
                sc *= fac;
                this.transform.localScale = sc;

                if (life < 0f) Destroy(this.gameObject);
                
            }
        
    }
