Added a base class for item behaviour
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user