Description
The LastWaterEffect
property of the PhysicsBody
class represents the time elapsed since the last water splash effect was triggered. This property is primarily used internally to manage and optimize the rendering or simulation of water effects associated with the physics body.
Usage
Access the LastWaterEffect
property to determine how much time has passed since the last water splash effect occurred. This can be useful for debugging or extending the functionality related to water interactions in your game.
Example
// Example of accessing the LastWaterEffect property
PhysicsBody myPhysicsBody = new PhysicsBody();
RealTimeSince timeSinceLastSplash = myPhysicsBody.LastWaterEffect;
// Check if a certain amount of time has passed since the last water effect
if (timeSinceLastSplash > 1.0f)
{
// Trigger a new water splash effect
TriggerWaterSplashEffect();
}