⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objectgroup.java

📁 tiled地图编辑器是2d的,很不错的国外软件,使用起来很方便的
💻 JAVA
字号:
/* *  Tiled Map Editor, (c) 2004-2006 * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  Adam Turk <aturk@biggeruniverse.com> *  Bjorn Lindeijer <b.lindeijer@xs4all.nl> */package tiled.core;import java.awt.Rectangle;import java.awt.geom.Area;import java.util.*;/** * @version $Id: ObjectGroup.java 683 2006-06-25 14:17:37Z bjorn $ */public class ObjectGroup extends MapLayer{    private LinkedList boundObjects;    public ObjectGroup() {        boundObjects = new LinkedList();    }    /**     * Creates an object group that is part of the given map and has the given     * origin.     *     * @param map    the map this layer is part of     * @param origx  the x origin of this layer     * @param origy  the y origin of this layer     */    public ObjectGroup(Map map, int origx, int origy) {        super(map);        boundObjects = new LinkedList();        setBounds(new Rectangle(origx, origy, 0, 0));    }    /**     * Creates an object group with a given area. The size of area is     * irrelevant, just its origin.     *     * @param area the area of the object group     */    public ObjectGroup(Rectangle area) {        super(area);        boundObjects = new LinkedList();    }    /**     * Clone constructor.     *     * @param group the group to clone     */    public ObjectGroup(ObjectGroup group) {        boundObjects = new LinkedList();    }    /**     * @see MapLayer#rotate(int)     */    public void rotate(int angle) {    }    /**     * @see MapLayer#mirror(int)     */    public void mirror(int dir) {    }    public void mergeOnto(MapLayer other) {    }    public void copyFrom(MapLayer other) {    }    public void maskedCopyFrom(MapLayer other, Area mask) {    }    public void copyTo(MapLayer other) {    }    /**     * @see MapLayer#resize(int,int,int,int)     */    public void resize(int width, int height, int dx, int dy) {        // TODO: Translate contained objects by the change of origin    }    /**     * @deprecated     */    public boolean isUsed(Tile t) {        return false;    }        public boolean isEmpty() {    	return boundObjects.isEmpty();    }    /**     * @deprecated     */    public MapLayer createDiff(MapLayer ml) {        return null;    }    public void bindObject(MapObject o) {        boundObjects.add(o);    }    public void unbindObject(MapObject o) {        boundObjects.remove(o);    }    public void unbindAll() {        boundObjects.clear();    }    public ListIterator getObjects() {        return (ListIterator) boundObjects.iterator();    }}

⌨️ 快捷键说明

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