Game.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:OriginalSpaceShooter 作者:
private void render() {
    BufferStrategy gameBS = this.getBufferStrategy();
    if (gameBS == null) {
        this.createBufferStrategy(3);
        return;
    }
    Graphics gameG = gameBS.getDrawGraphics();

    ///////////////DRAW GRAPHICS///////////////////
    gameG.setColor(Color.black); //TODO Replace Background Color with a Background Picture
    gameG.fillRect(0, 0, getWidth(), getHeight()); //background size
    handler.render(gameG);

    gameG.setColor(Color.white);
    gameG.drawString("| SCORE: " +
            handler.getScore() + " | HEALTH: " +
            handler.getHealth() + " | LEVEL: " +
            handler.getLevel() + " | MONEY: " +
            handler.getMoney() + " |", 15, 15);
    /////////////////////////////////////////////

    gameG.dispose();
    gameBS.show();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号