public static void Unlock(Script_UsableKey key, string targetId) { if (OnUnlock != null) { OnUnlock(key, targetId); } }
protected override void OnUnlock(Script_UsableKey key) { Script_Game.Game.ChangeStateCutScene(); GetComponent <Script_TimelineController>().PlayableDirectorPlayFromTimelines(0, 0); base.OnUnlock(key); }
// Search in Items which hold Usables. public bool TryUseKey(Script_UsableKey key) { int slot; Script_Item foundItem = SearchItemsForItemById(key.id, out slot); if (foundItem != null) { items.RemoveItemInSlot(slot); return(true); } return(false); }