Persist defensive behavior state in typed snapshots
This commit is contained in:
parent
21d5cbdf79
commit
35c4195dac
10 changed files with 149 additions and 8 deletions
|
|
@ -936,6 +936,28 @@ public class ActionGameManager : MonoBehaviour
|
|||
ThrusterTorque = thruster.Torque
|
||||
};
|
||||
}
|
||||
else if (behavior is Shield shield)
|
||||
{
|
||||
state = new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
ShieldEfficiency = shield.Efficiency,
|
||||
ShieldEnergyUsage = shield.EnergyUsage
|
||||
};
|
||||
}
|
||||
else if (behavior is VelocityLimit velocityLimit)
|
||||
{
|
||||
state = new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
VelocityLimit = velocityLimit.Limit
|
||||
};
|
||||
}
|
||||
else if (behavior is Thermotoggle thermotoggle)
|
||||
{
|
||||
state = new AetheriaRuntimeBehaviorStateCommit
|
||||
{
|
||||
ThermotoggleTargetTemperature = thermotoggle.TargetTemperature
|
||||
};
|
||||
}
|
||||
|
||||
if (state == null)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue