Hi,
i made some sort of game over screen, it works but i want to change the font. how do i do that?
code of the game over class:
i tried some things with "setFont" but i cant get it to work
thanks :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Font; /** * You died. * * @author * @version 8.12.17 */ public class DeathScreen extends Actor { public DeathScreen() { setImage( new GreenfootImage( "YOU DIED" , 100 , Color.RED, Color.BLACK)); //setFont(new Font("OptimusPrinceps", Font.PLAIN, 20)); } } |