using System.Collections; using UnityEngine; namespace Game { public class Modification : Collectable { public ModificationProperties Properties { get; set; } private IEnumerator Start() { gameObject.AddComponent().sprite = Properties.image; yield return new WaitForSeconds(Properties.pickupDuration); Destroy(gameObject); } protected override void OnCollect(Player collector) { collector.StartCoroutine(collector.ProcessModification(Properties)); } } }