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
|
|
@ -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;
|
||||
|
|
|
|||
Reference in a new issue