You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Unity.Netcode;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UIElements;
|
|
|
|
|
|
|
|
namespace Game {
|
|
|
|
|
|
|
|
public class Modification : Collectable {
|
|
|
|
|
|
|
|
public ModificationProperties Properties { get; set; }
|
|
|
|
|
|
|
|
private IEnumerator Start() {
|
|
|
|
gameObject.AddComponent<SpriteRenderer>().sprite = Properties.image;
|
|
|
|
yield return new WaitForSeconds(Properties.pickupDuration);
|
|
|
|
Destroy(gameObject);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void OnCollect(Player collector) {
|
|
|
|
collector.StartCoroutine(collector.ProcessModification(Properties));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|