Esempio 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);
    }
Esempio n. 2
0
    public override void setup(ObjectActor subject, ObjectInteractable source)
    {
        duration    = CONCUSSIONDURATION;
        effectName  = "Concussed";
        description = string.Format("Easily interrupted.");
        GameObjectObserver obs = subject.gameObject.AddComponent <GameObjectObserver>();

        obs.setupObserver(trigger);
        subject.rawHitSubscribe(obs);
        conditionID = 4;
        base.setup(subject, source);
    }
Esempio n. 3
0
 void Start()
 {
     if (navAgent == null)
     {
         Debug.Log("Warning! no NavMeshAgent given " + this.gameObject.name);
     }
     if (combatableSelf == null)
     {
         Debug.Log("Warning! no object combatable script given " + this.gameObject.name);
     }
     hitWatch = gameObject.AddComponent <GameObjectObserver>();
     hitWatch.setupObserver(OnNext);
     combatableSelf.rawHitSubscribe(hitWatch);
 }
Esempio n. 4
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);
        }
    }
Esempio n. 5
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);
        }
    }
Esempio n. 6
0
 public void teamSetup()
 {
     base.setup();
     foreach (BasicMotivator unit in motivatorUnits)
     {
         unit.joinTeam(this);
     }
     foreach (ObjectActor actor in actorObjects)
     {
         comboObserver obs = gameObject.AddComponent <comboObserver>();
         obs.setupObserver(trigger);
         actor.targettedSubscribe(obs);
         GameObjectObserver deadMember = gameObject.AddComponent <GameObjectObserver>();
         deadMember.setupObserver(removeDead);
         actor.deathSubscribe(deadMember);
     }
 }
Esempio n. 7
0
 void Start()
 {
     /*
      * if (navAgent == null)
      * {
      *  Debug.Log("Warning! no NavMeshAgent given " + this.gameObject.name);
      * }
      */
     if (actorSelf == null)
     {
         Debug.Log("Warning! no object actor script given " + this.gameObject.name);
     }
     hitWatch = gameObject.AddComponent <GameObjectObserver>();
     hitWatch.setupObserver(OnNext);
     actorSelf.rawHitSubscribe(hitWatch);
     skillBar   = actorSelf.getSkillBar();
     rand       = new System.Random();
     skillCount = skillBar.Length;
 }