void OnDestroy() { if (node != null) { node.RemoveObjectPropertyChangeHandler("level", LevelHandler); } }
void OnDestroy() { AtavismNode aNode = GetComponent <AtavismNode>(); if (aNode == null && transform != null && transform.parent != null) { aNode = transform.parent.GetComponent <AtavismNode>(); } if (aNode != null) { aNode.RemoveObjectPropertyChangeHandler("deadstate", HandleDeadState); } }
void OnDestroy() { AtavismNode aNode = GetComponent <AtavismNode>(); if (aNode != null) { aNode.RemoveObjectPropertyChangeHandler("weaponType", HandleWeaponType); aNode.RemoveObjectPropertyChangeHandler("weapon2Type", HandleWeapon2Type); aNode.RemoveObjectPropertyChangeHandler("deadstate", HandleDeadState); aNode.RemoveObjectPropertyChangeHandler("combatstate", HandleCombatState); aNode.RemoveObjectPropertyChangeHandler("movement_state", MovementStateHandler); aNode.RemoveObjectPropertyChangeHandler("mount", HandleMount); aNode.RemoveObjectPropertyChangeHandler("waterHeight", HandleWaterHeight); aNode.RemoveObjectPropertyChangeHandler("state", HandleState); aNode.RemoveObjectPropertyChangeHandler("aggressive", HandleAggressive); } if (mount != null) { Destroy(mount); } }
void OnDestroy() { if (node != null) { node.RemoveObjectPropertyChangeHandler("title", LevelHandler); node.RemoveObjectPropertyChangeHandler("level", LevelHandler); node.RemoveObjectPropertyChangeHandler("reaction", TargetTypeHandler); node.RemoveObjectPropertyChangeHandler("aggressive", TargetTypeHandler); node.RemoveObjectPropertyChangeHandler("adminLevel", AdminLevelHandler); node.RemoveObjectPropertyChangeHandler("questavailable", QuestAvailableHandler); node.RemoveObjectPropertyChangeHandler("questinprogress", QuestInProgressHandler); node.RemoveObjectPropertyChangeHandler("questconcludable", QuestConcludableHandler); node.RemoveObjectPropertyChangeHandler("dialogue_available", DialogueAvailableHandler); node.RemoveObjectPropertyChangeHandler("itemstosell", ItemsToSellHandler); node.RemoveObjectPropertyChangeHandler("nameDisplay", NameDisplayHandler); node.RemoveObjectPropertyChangeHandler("guildName", GuildNameDisplayHandler); node.RemoveObjectPropertyChangeHandler("deadstate", HandleDeadState); node.RemoveObjectPropertyChangeHandler("bankteller", HandleDeadState); } AtavismEventSystem.UnregisterEvent("UPDATE_LANGUAGE", this); //StopCoroutine(chIcon); //StopCoroutine(chTimer); StopAllCoroutines(); }