Skip to content

Commit 73457e8

Browse files
author
Julien Poulton
committed
Merge branch 'fix-text-api' into 'master'
[FIX][SDK] Fix the createText method to have the same pattern as all other creates See merge request codingame/game-engine!265
2 parents 14bcd3f + 444a9e6 commit 73457e8

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

engine/modules/entities/src/main/java/com/codingame/gameengine/module/entities/GraphicEntityModule.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,17 @@ public Text createText(String string) {
300300
e.setText(string);
301301
newEntity(e);
302302
return e;
303-
303+
}
304+
305+
/**
306+
* Creates a new Text entity, its graphical counterpart will be created on the frame currently being computed.
307+
*
308+
* @return the entity. Modify its properties to animate the graphical counterpart.
309+
*/
310+
public Text createText() {
311+
Text e = new Text();
312+
newEntity(e);
313+
return e;
304314
}
305315

306316
/**

playground/misc/misc-3-release-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The CodinGame SDK is regularly updated and improved. This document lets you know what changed in the latest releases.
44

5+
## Next Release
6+
7+
### 🐞 Bug fix
8+
9+
- The `GraphicEntityModule` method `createText` no longer requires a text parameter
10+
511
## 3.11.1
612

713
### 🐞 Bug fix

0 commit comments

Comments
 (0)