void Map_BeforeMapGeneralObjectOnRender(MapGeneralObject entity, Camera camera, ref bool skipCallOnRender) { if (!skipCallOnRender) { MapObject mapObject = entity as MapObject; if (mapObject != null && GetObjectLastFrozenState(mapObject)) { skipCallOnRender = true; } } }
void Map_BeforeMapGeneralObjectOnRenderFrame(MapGeneralObject entity, ref bool skipCallOnRenderFrame) { if (!skipCallOnRenderFrame) { MapObject mapObject = entity as MapObject; if (mapObject != null) { //TO DO: don't calculate each render frame event. bool frozen = CalculateFrozenState(mapObject); mapObject._FreezeObjectsManagerData = new MapObject._FreezeObjectsManagerDataStruct(frozen); if (frozen) { skipCallOnRenderFrame = true; } } } }