private void OnDestroy() { if (this.isExitingApplication) { return; } LootTable.RemoveListener(this.OnUseLootTable); }
// METHODS: ------------------------------------------------------------------------------- private void OnEnable() { this.lootTable = this.target as LootTable; this.spNoDropWeight = this.serializedObject.FindProperty("noDropWeight"); this.spLoot = this.serializedObject.FindProperty("loot"); this.lootList = new ReorderableList( this.serializedObject, this.spLoot, true, true, true, true ); this.lootList.drawHeaderCallback = this.WaresList_Header; this.lootList.drawElementCallback = this.WaresList_Paint; this.lootList.elementHeightCallback = this.WaresList_Height; }
private void Start() { LootTable.AddListener(this.OnUseLootTable); }