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

@ -65,7 +65,7 @@ var private float updateCooldown;
// Recorded game type, to avoid constant conversions every tick
var private KFGameType gameType;
public function OnEnabled()
protected function OnEnabled()
{
gameType = KFGameType(level.game);
if (gameType == none)
@ -78,7 +78,7 @@ public function OnEnabled()
}
}
public function OnDisabled()
protected function OnDisabled()
{
gameType = KFGameType(level.game);
if (gameType != none && disableTick)