entity.java

来自「Java 3D API, 一套完整的3d引擎」· Java 代码 · 共 38 行

JAVA
38
字号
import com.threed.jpct.*;

/**
 * An entity of the "game world", like the car, a bullet...
 */
public interface Entity {

   /**
    * Makes sure that the world knows this entity. Of course, a world can't
    * work with Entity but Object3D. Have a look at AbstractEntity to see
    * how this example deals with it.
    * @param world the world
    */
   void addToWorld(World world);

   /**
    * Moves the entity forward
    */
   void moveForward();

   /**
    * Moves the entity backwards
    */
   void moveBackward();

   /**
    * Gets the speed of the entity
    * @return the speed
    */
   float getSpeed();

   /**
    * Sets the speed of the entity
    * @param speed the speed
    */
   void setSpeed(float speed);
}

⌨️ 快捷键说明

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