Refactor Feature

Make events functions `OnEnabled()` and `OnEnabled()`
protected rather than public.

Move initialization and clean up logic into
`OnCreated()` and `OnDestroyed()` event functions.
This commit is contained in:
Anton Tarasenko 2020-04-08 01:49:17 +07:00
commit 3969eb3824
7 changed files with 14 additions and 14 deletions

View file

@ -58,7 +58,7 @@ struct FragAmmoRecord
};
var private array<FragAmmoRecord> ammoRecords;
public function OnEnabled()
protected function OnEnabled()
{
local Frag nextFrag;
// Find all frags, that spawned when this fix wasn't running.
@ -69,7 +69,7 @@ public function OnEnabled()
RecreateFrags();
}
public function OnDisabled()
protected function OnDisabled()
{
RecreateFrags();
ammoRecords.length = 0;