Inheritance: UnityEngine.MonoBehaviour
        // Initializes Object
        public override void Initialize(Item parent, A_ItemBehaviour behaviourParameters)
        {
            this.parentReference = parent;

            healAmountPerIncrement = ((HealOverTimePack) behaviourParameters).HealAmount;
            maxTime = ((HealOverTimePack) behaviourParameters).MaxTime;
            timeIncrements = ((HealOverTimePack) behaviourParameters).TimeIncrements;
        }
Example #2
0
        private void Start()
        {
            // Abstract Classes Start Function
            base.Initialize();

            // if behaviour is not null then add the object to the project
            if(behaviour != null)
            {
                A_ItemBehaviour ib = (A_ItemBehaviour)this.gameObject.AddComponent(behaviour.GetType());
                ib.Initialize(this, behaviour);
                behaviour = ib;
            }
        }
 // Abstract classes to act and initialize
 public abstract void Initialize( Item parent,  A_ItemBehaviour behaviourParameters );