using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class BladeScript : ProjectileBase { [NonSerialized] public float life; private SpriteRenderer sr { get { return this.gameObject.GetComponent(); } } public void Start() { Invoke("DestroySelf", life); } void DestroySelf() { Destroy(this.gameObject); } public void Update() { Color c = sr.color; c.a *= 0.99f; sr.color = c; } public void SetFlip(bool flip) { sr.flipX = flip; } }