Пример #1
0
    /// <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);
    }
Пример #2
0
    /// <summary>
    /// Use this for initialization
    /// </summary>
    virtual protected void Start()
    {
        pointsAddedEvent = new PointsAddedEvent();
        EventManager.AddPointAddedEventInvoker(this);

        blockDestroyedEvent = new BlockDestroyedEvent();
        EventManager.AddLastBlockDestroyedEventInvoker(this);
    }
Пример #3
0
 protected virtual void Remove()
 {
     BlockDestroyedEvent?.Invoke(this);
     bonusGiver?.Activate();
     Destroy(gameObject);
 }