Exemplo n.º 1
0
 public void piercingHitSubscribe(GameObjectObserver observer)
 {
     if (!piercingHitObservers.Contains(observer))
     {
         piercingHitObservers.Add(observer);
     }
     observer.connect(piercingHitObservers);
 }
Exemplo n.º 2
0
 public void bludgeoningHitSubscribe(GameObjectObserver observer)
 {
     if (!bludgeoningHitObservers.Contains(observer))
     {
         bludgeoningHitObservers.Add(observer);
     }
     observer.connect(bludgeoningHitObservers);
 }
Exemplo n.º 3
0
 public void fireHitSubscribe(GameObjectObserver observer)
 {
     if (!fireHitObservers.Contains(observer))
     {
         fireHitObservers.Add(observer);
     }
     observer.connect(fireHitObservers);
 }
Exemplo n.º 4
0
 public void physicalHitSubscribe(GameObjectObserver observer)
 {
     if (!physicalHitObservers.Contains(observer))
     {
         physicalHitObservers.Add(observer);
     }
     observer.connect(physicalHitObservers);
 }
Exemplo n.º 5
0
 public void mechHealingHitSubscribe(GameObjectObserver observer)
 {
     if (!mechHealingHitObservers.Contains(observer))
     {
         mechHealingHitObservers.Add(observer);
     }
     observer.connect(mechHealingHitObservers);
 }
Exemplo n.º 6
0
 public void coldHitSubscribe(GameObjectObserver observer)
 {
     if (!coldHitObservers.Contains(observer))
     {
         coldHitObservers.Add(observer);
     }
     observer.connect(coldHitObservers);
 }
Exemplo n.º 7
0
 public void drainingHitSubscribe(GameObjectObserver observer)
 {
     if (!drainingHitObservers.Contains(observer))
     {
         drainingHitObservers.Add(observer);
     }
     observer.connect(drainingHitObservers);
 }
Exemplo n.º 8
0
 public void bioHealingHitSubscribe(GameObjectObserver observer)
 {
     if (!bioHealingHitObservers.Contains(observer))
     {
         bioHealingHitObservers.Add(observer);
     }
     observer.connect(bioHealingHitObservers);
 }
Exemplo n.º 9
0
 public void magicHitSubscribe(GameObjectObserver observer)
 {
     if (!magicHitObservers.Contains(observer))
     {
         magicHitObservers.Add(observer);
     }
     observer.connect(magicHitObservers);
 }
Exemplo n.º 10
0
 public void occultHitSubscribe(GameObjectObserver observer)
 {
     if (!occultHitObservers.Contains(observer))
     {
         occultHitObservers.Add(observer);
     }
     observer.connect(occultHitObservers);
 }
Exemplo n.º 11
0
 public void electricHitSubscribe(GameObjectObserver observer)
 {
     if (!electricHitObservers.Contains(observer))
     {
         electricHitObservers.Add(observer);
     }
     observer.connect(electricHitObservers);
 }
Exemplo n.º 12
0
 public void acidHitSubscribe(GameObjectObserver observer)
 {
     if (!acidHitObservers.Contains(observer))
     {
         acidHitObservers.Add(observer);
     }
     observer.connect(acidHitObservers);
 }
Exemplo n.º 13
0
 public void poisonHitSubscribe(GameObjectObserver observer)
 {
     if (!poisonHitObservers.Contains(observer))
     {
         poisonHitObservers.Add(observer);
     }
     observer.connect(poisonHitObservers);
 }
Exemplo n.º 14
0
 public void slashingHitSubscribe(GameObjectObserver observer)
 {
     if (!slashingHitObservers.Contains(observer))
     {
         slashingHitObservers.Add(observer);
     }
     observer.connect(slashingHitObservers);
 }
Exemplo n.º 15
0
 public void rawHitSubscribe(GameObjectObserver observer)
 {
     if (!rawHitObservers.Contains(observer))
     {
         rawHitObservers.Add(observer);
     }
     observer.connect(rawHitObservers);
 }
Exemplo n.º 16
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.º 17
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);
    }
Exemplo n.º 18
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);
 }
Exemplo n.º 19
0
    public void deathSubscribe(GameObjectObserver observer)
    {
        if (deathObservers == null)
        {
            Debug.Log("WTF");
        }


        if (!deathObservers.Contains(observer))
        {
            deathObservers.Add(observer);
        }
        observer.connect(deathObservers);
    }
Exemplo n.º 20
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.º 21
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);
        }
    }
Exemplo n.º 22
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);
     }
 }
Exemplo n.º 23
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;
 }