/// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> virtual protected void Start() { pointsAddedEvent = new PointsAddedEvent(); EventManager.AddInvokerPoints(this); blockDestroyedEvent = new BlockDestroyedEvent(); EventManager.AddInvokerBlocDestroyed(this); }
/// <summary> /// Use this for initialization /// </summary> virtual protected void Start() { pointsAddedEvent = new PointsAddedEvent(); EventManager.AddPointAddedEventInvoker(this); blockDestroyedEvent = new BlockDestroyedEvent(); EventManager.AddLastBlockDestroyedEventInvoker(this); }
protected virtual void Remove() { BlockDestroyedEvent?.Invoke(this); bonusGiver?.Activate(); Destroy(gameObject); }