gameobjectlocationstruct.java

来自「用java开发的一个实施策略游戏源码 值得学习一下」· Java 代码 · 共 29 行

JAVA
29
字号
package netwar.utils;


/** A utility class for the map maker that contains many of the attibutes of a single GameObject. Also serializaable, this structure often contain immovable objects like trees.
 * @author Kyle Kakligian
 */
public class GameObjectLocationStruct implements java.io.Serializable {
    
    /** x locatoin of the unit
     */
    public int x;
    
    /** x locatoin of the unit
     */
    public int y;
    
    /** index of the GameObject from the list in a map file.
     */    
    public int   unitIndex;
    /** normal constructor
     * @param X x locatoin of the unit
     * @param Y y locatoin of the unit
     * @param UnitIndex index of the GameObject from the list in a map file.
     */    
    public GameObjectLocationStruct(int X, int Y, int UnitIndex) {
        x = X; y = Y;
        unitIndex = UnitIndex;
    }
}

⌨️ 快捷键说明

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