// Start is called before the first frame update protected virtual void Start() { lastBlockDestroyed = new BlockDestroyed(); addPointsEvent = new AddPointsEvent(); EventManager.AddPointsInvoker(this); EventManager.AddGameOverInvoker(lastBlockDestroyed); }
virtual protected void Start() { AddPointsEvent = new AddPointsEvent(); EventManager.AddPointsEventInvoker(this); blockDestroyed = new BlockDestroyed(); EventManager.AddBlockDestroyedInvokers(this); }
/// <summary> /// Use this for initialization /// </summary> virtual protected void Start() { pointsAdded = new PointsAdded(); EventManager.AddPointsAddedInvoker(this); blockDestroyed = new BlockDestroyed(); EventManager.AddBlockDestroyedInvoker(this); }
public static void AddBlockDestroyedInvoker(BlockDestroyed inputEvent) { blockDestroyedInvokers.Add(inputEvent); foreach (var currentAction in blockDestroyedListeners) { inputEvent.AddListener(currentAction); } }
/// <summary> /// Use this for initialization /// </summary> virtual protected void Start() { // scoring support pointsAdded = new PointsAdded(); EventManager.AddPointsAddedInvoker(this); // destruction support blockDestroyed = new BlockDestroyed(); EventManager.AddBlockDestroyedInvoker(this); }
protected Block() { blockDestroyedEvent = new BlockDestroyed(); EventManager.AddBlockDestroyedInvoker(this); }