@@ -10,7 +10,7 @@ The plugin can be used in both C++ and Blueprint projects.
1010
1111** At the moment, the package is compatible only with Unreal Engine 4.**
1212
13- 1 . Download [ ** package file** ] ( https://github.com/TrickyFatCat/TrickyKeyringSystem/releases/tag/v1.0 ) ;
13+ 1 . Download the latest [ ** package file** ] ( https://github.com/TrickyFatCat/TrickyKeyringSystem/releases/ ) ;
14142 . Unzip the package to the Plugins folder in engine folder, e.g. ` C:\Program Files\Epic Games\UE_4.27\Engine\Plugins ` ;
15153 . Restart the project;
1616
@@ -30,6 +30,7 @@ The plugin contains:
30301 . KeyType object;
31312 . KeyringComponent;
32323 . KeyringLibrary;
33+ 4 . LockComponent;
3334
3435### KeyType object
3536
@@ -79,8 +80,34 @@ A function library with useful functions to work with KeyringComponent.
79808 . ` IsKeyDestroyable ` - checks if the given key class is destroyable;
80819 . ` RemoveAllKeys ` - removes all keys form KeyringComponent of the given actor;
8182
83+ ### Lock Component
84+
85+ Controls locking/unlocking by a given key.
86+
87+ #### Parameters
88+
89+ 1 . ` bLockedOnStart ` - toggles if the component is locked on begin play;
90+ 2 . ` RequiredKey ` - the key type required to lock/unlock the component;
91+ 3 . ` bLockingRequiresKey ` - toggles if the key is required to lock the component;
92+
93+ #### Functions
94+
95+ 1 . ` Lock ` - locks the component;
96+ 2 . ` Unlock ` - unlocks the component;
97+ 3 . ` CanUseLock ` - checks if the component can be locked/unlocked by a given actor;
98+ 4 . ` GetIsLocked ` - returns if the component is locked or not;
99+
100+ #### Delegates
101+
102+ 1 . ` OnLocked ` - called when the component was locked;
103+ 2 . ` OnUnlocked ` - called when the component was unlocked;
104+ 3 . ` OnCantLocked ` - called when the component cant be locked;
105+ 4 . ` OnCantUnlock ` - called when the component cant be unlocked;
106+
82107## Quick setup
83108
841091 . Add KeyRingComponent to your character;
851102 . Create key classes you need inherited from KeyType object;
86- 3 . Add keys to the keyring or remove them using pickups or custom events;
111+ 3 . Add and adjust LockComponent to actors which must be locked;
112+ 4 . Implement lock/unlock logic in the actors with LockComponent;
113+ 5 . Give player keys using pickups or other in-game methods;
0 commit comments