Restore behavior runtime state from typed Continue
This commit is contained in:
parent
c8b58fa44f
commit
01fc810eb4
23 changed files with 406 additions and 13 deletions
|
|
@ -134,4 +134,18 @@ public class ConstantWeapon : Weapon, IProgressBehavior, IEventBehavior
|
|||
OnStopFiring?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void RestoreRuntimeState(
|
||||
bool firing,
|
||||
int ammo,
|
||||
float ammoIntervalProgress,
|
||||
float reloadProgress,
|
||||
bool reloading)
|
||||
{
|
||||
base.RestoreRuntimeState(firing);
|
||||
_ammo = ammo;
|
||||
_ammoInterval = ammoIntervalProgress;
|
||||
_reload = reloadProgress;
|
||||
_reloading = reloading;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue