Added a base class for item behaviour

This commit is contained in:
2026-04-18 12:11:53 +01:00
parent 352184df25
commit 256ab65060
7 changed files with 69 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
using PashaBibko.Pacore.Attributes;
using System.Collections.Generic;
using Fruitomation.Game.Items;
using Fruitomation.Global;
using UnityEngine;
@@ -77,10 +78,7 @@ namespace Fruitomation.Game
Debug.Assert(behaviour is not null, "Could not find FruitBehaviour");
ActiveFruits.Add(behaviour);
behaviour.InitFruitBehaviour
(
GameCanvas, this
);
behaviour.InitBehaviour(GameCanvas);
}
public void RemoveFruit(FruitBehaviour fruit) => ActiveFruits.Remove(fruit);