Esempio n. 1
0
    public void ExecuteAction(Entity target)
    {
        // When trap is triggered change status of player to poisoned. Define poison behavior elsewhere?
        AdjustHealthOverTime aHOT = target.gameObject.AddComponent <AdjustHealthOverTime>();

        aHOT.Duration     = duration;
        aHOT.TickRate     = tickRate;
        aHOT.ValuePerTick = dmgPerTick;
    }
Esempio n. 2
0
 public void ExecuteAction(List <Entity> targets)
 {
     foreach (Entity e in targets)
     {
         AdjustHealthOverTime aHOT = e.gameObject.AddComponent <AdjustHealthOverTime> ();
         aHOT.Duration     = duration;
         aHOT.TickRate     = tickRate;
         aHOT.ValuePerTick = hPerTick;
     }
 }