Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        //addToLog(QuestLog.Instance);

        //conditions for success

        obs = gameObject.AddComponent <GameObjectObserver>();
        obs.setupObserver(targetEliminated);
        king.deathSubscribe(obs);
    }
Exemplo n.º 2
0
    public void setup()
    {
        if (this.target != null)
        {
            removalSub = gameObject.AddComponent <IntObserver>();// dequeue index. usually 0.
            removalSub.setupObserver(shiftByIndex);
            target.effectRemoveSubscribe(removalSub);

            additionSub = gameObject.AddComponent <GameObjectObserver>();
            additionSub.setupObserver(effectAddToList);
            target.effectAddSubscribe(additionSub);

            death = gameObject.AddComponent <GameObjectObserver>();
            death.setupObserver(targetDied);
            target.deathSubscribe(death);
        }
    }
Exemplo n.º 3
0
    public void setup()
    {
        if (this.target != null)
        {
            dequeue = gameObject.AddComponent <IntObserver>();// dequeue index. usually 0.
            dequeue.setupObserver(skillRemovedByIndex);
            target.skillDequeueSubscribe(dequeue);

            enqueue = gameObject.AddComponent <GameObjectObserver>();
            enqueue.setupObserver(skillEnqueued);
            target.skillEnqueueSubscribe(enqueue);

            death = gameObject.AddComponent <GameObjectObserver>();
            death.setupObserver(targetDied);
            target.deathSubscribe(death);
        }
    }