MCPcopy Create free account
hub / github.com/Card-Forge/forge / drawNightDay

Method drawNightDay

forge-gui-mobile/src/forge/Graphics.java:1265–1285  ·  view source on GitHub ↗
(FImage image, float x, float y, float w, float h, Float timeOfDay, boolean darkOverlay, float rippleAmount)

Source from the content-addressed store, hash-verified

1263 }
1264
1265 public void drawNightDay(FImage image, float x, float y, float w, float h, Float timeOfDay, boolean darkOverlay, float rippleAmount) {
1266 if (image == null)
1267 return;
1268 if (timeOfDay != null) {
1269 batch.end();
1270 shaderNightDay.bind();
1271 shaderNightDay.setUniformf("u_timeOfDay", timeOfDay);
1272 shaderNightDay.setUniformf("u_time", rippleAmount);
1273 shaderNightDay.setUniformf("u_bias", darkOverlay? 0.7f : 1f);
1274 batch.setShader(shaderNightDay);
1275 batch.begin();
1276 //draw
1277 image.draw(this, x, y, w, h);
1278 //reset
1279 batch.end();
1280 batch.setShader(null);
1281 batch.begin();
1282 } else {
1283 drawImage(image, x, y, w, h);
1284 }
1285 }
1286
1287 public void drawUnderWaterImage(TextureRegion image, float x, float y, float w, float h, float time) {
1288 batch.end();

Callers 2

drawBackgroundMethod · 0.80
drawBackgroundMethod · 0.80

Calls 4

drawImageMethod · 0.95
drawMethod · 0.65
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected