overlay.java

来自「Java games programing--很好的java游戏编程源码」· Java 代码 · 共 32 行

JAVA
32
字号
package com.brackeen.javagamebook.graphics3D;

import java.awt.Graphics2D;
import com.brackeen.javagamebook.math3D.ViewWindow;

/**
    An overlay drawn over a game scene.
*/
public interface Overlay {


    /**
        Updates this overlay with the specified amount of
        elapsed time since the last update.
    */
    public void update(long elapsedTime);

    /**
        Draws an overlay onto a frame. The ViewWindow specifies
        the bounds of the view window (usually, the entire
        screen). The screen bounds can be retrieved by calling
        g.getDeviceConfiguration().getBounds();
    */
    public void draw(Graphics2D g, ViewWindow viewWindow);


    /**
        Returns true if this overlay is enabled (should be drawn).
    */
    public boolean isEnabled();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?