using UnityEngine;
using System.Collections;

public class PuffScript : MonoBehaviour {

    SpriteRenderer sr;
    public float fadeSpeed;
    public float riseSpeed;

	// Use this for initialization
	void Start () {
        sr = GetComponent<SpriteRenderer>();
	}
	
	// Update is called once per frame
	void Update () {

        transform.position += Vector3.up * riseSpeed;

        sr.color = new Color(1f, 1f, 1f, sr.color.a - fadeSpeed);
        if(sr.color.a <= 0f)
        {
            Destroy(gameObject);
        }
	}
}
