FogExplorationData ​
Inherits: Resource
Stores fog of war exploration data for a single map. Used by WorldContainer to cache and restore fog state between map transitions.
Properties ​
PackedByteArray | exploration_bytes | PackedByteArray() |
Vector2 | map_size | Vector2.ZERO |
float | last_updated | 0.0 |
Methods ​
FogExplorationData | from_image( image: Image, size: Vector2 ) static |
Image | get_image() |
bool | is_valid_for_size( size: Vector2 ) |
bool | has_data() |
void | clear() |
int | get_data_size() |
Property descriptions ​
PackedByteArray exploration_bytes = PackedByteArray() ​
The exploration image as compressed PNG bytes
Vector2 map_size = Vector2.ZERO ​
The map size this data was captured from (for validation)
float last_updated = 0.0 ​
Timestamp when this data was last updated
Method descriptions ​
FogExplorationData from_image( image: Image, size: Vector2 ) ​
Create from an exploration image
Image get_image() ​
Get the exploration image (returns null if no data or decompression fails)
bool is_valid_for_size( size: Vector2 ) ​
Check if this data is valid for a given map size
bool has_data() ​
Check if data exists
void clear() ​
Clear the stored data
int get_data_size() ​
Get size of stored data in bytes (for debugging)