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:
parent
dd0bdc8904
commit
3969eb3824
7 changed files with 14 additions and 14 deletions
|
|
@ -133,7 +133,7 @@ struct WeaponRecord
|
|||
// All weapons we've detected so far.
|
||||
var private array<WeaponRecord> registeredWeapons;
|
||||
|
||||
public function OnEnabled()
|
||||
protected function OnEnabled()
|
||||
{
|
||||
local KFWeapon nextWeapon;
|
||||
local KFAmmoPickup nextPickup;
|
||||
|
|
@ -149,7 +149,7 @@ public function OnEnabled()
|
|||
}
|
||||
}
|
||||
|
||||
public function OnDisabled()
|
||||
protected function OnDisabled()
|
||||
{
|
||||
local int i;
|
||||
local AmmoPickupStalker nextStalker;
|
||||
|
|
|
|||
Reference in a new issue