Skip to content
This repository was archived by the owner on Jun 7, 2025. It is now read-only.

Commit a3116e2

Browse files
committed
Update README.md
1 parent e6c6c34 commit a3116e2

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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/);
1414
2. Unzip the package to the Plugins folder in engine folder, e.g. `C:\Program Files\Epic Games\UE_4.27\Engine\Plugins`;
1515
3. Restart the project;
1616

@@ -30,6 +30,7 @@ The plugin contains:
3030
1. KeyType object;
3131
2. KeyringComponent;
3232
3. KeyringLibrary;
33+
4. LockComponent;
3334

3435
### KeyType object
3536

@@ -79,8 +80,34 @@ A function library with useful functions to work with KeyringComponent.
7980
8. `IsKeyDestroyable` - checks if the given key class is destroyable;
8081
9. `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

84109
1. Add KeyRingComponent to your character;
85110
2. 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

Comments
 (0)