Added project

This commit is contained in:
2023-06-11 00:35:07 +03:00
parent 5bfa765889
commit f06629200c
545 changed files with 44339 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class BuffReceiver : MonoBehaviour {
private List<Buff> buffs;
public Action OnBuffChanged;
private void Start() {
GameManager.Instance.buffReceiverContainer.Add(gameObject, this);
buffs = new List<Buff>();
}
public List<Buff> Buffs => buffs;
public void AddBuff(Buff buff) {
if (!buffs.Contains(buff)) {
buffs.Add(buff);
}
if (OnBuffChanged != null) {
OnBuffChanged();
}
}
public void RemoveBuff(Buff buff) {
if (buffs.Contains(buff)) {
buffs.Remove(buff);
}
if (OnBuffChanged != null) {
OnBuffChanged();
}
}
}