Persist turret controller state in typed snapshots
This commit is contained in:
parent
cd009fa9a9
commit
6deea479dd
11 changed files with 91 additions and 8 deletions
|
|
@ -981,6 +981,15 @@ public class ActionGameManager : MonoBehaviour
|
|||
StatModifierTargetStatCount = statModifier.TargetStatCount
|
||||
};
|
||||
}
|
||||
else if (behavior is TurretController turretController)
|
||||
{
|
||||
state = new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
TurretControllerWeaponCount = turretController.WeaponCount,
|
||||
TurretControllerShotSpeed = turretController.ShotSpeed,
|
||||
TurretControllerPredictShots = turretController.PredictShots
|
||||
};
|
||||
}
|
||||
|
||||
if (state == null)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ public class TurretController : Behavior, IInitializableBehavior
|
|||
private float _shotSpeed;
|
||||
private bool _predictShots;
|
||||
|
||||
public int WeaponCount => _weapons.Count;
|
||||
public float ShotSpeed => _shotSpeed;
|
||||
public bool PredictShots => _predictShots;
|
||||
|
||||
public TurretController(TurretControllerData data, EquippedItem item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue