protected virtual void slow(GameObject victim) { InBuilding shelterCheck = victim.GetComponent <InBuilding>(); if (shelterCheck == null || !shelterCheck.getPlayerInBuilding()) { buffsys.slowApplyingSystem(victim, slowDuration, slowDecimal); } }
void OnTriggerEnter(Collider other) { GameObject victim = other.gameObject; ValidBuffTarget valid = victim.GetComponent <ValidBuffTarget>(); if (valid != null) { if (!checkIfInBuilding(victim) && (victim.tag.Equals("Player") || victim.tag.Equals("OwnedNPC"))) { buffsys.slowApplyingSystem(victim, slowDuration, slowDecimal); } } }