public float takeColdDamage(float delta, ObjectInteractable source)//Damage subtracts. deltas should be positive. { if (!dead && takesColdDamage) { if (delta >= 0.5f) { foreach (var observer in coldHitObservers) { observer.trigger(source.gameObject); } foreach (var observer in coldDamageObservers) { delta = observer.trigger(delta); } } ChilledEffect chilled = GetComponent <ChilledEffect>(); if (chilled != null) { chilled.addLoss(delta / 100); } return(takeRawDamage(applyArmor(coldArmor, delta), source)); } else { return(0); } }
public void beginBurning(ObjectActor subject, ObjectInteractable source) { ChilledEffect chilled = subject.getChilledEffect(); if (chilled != null) { subject.endChilled(); return; } beginCondition <BurningEffect>(subject, source); }