📄 solarsystem.java
字号:
/*
* SolarSystem.java
*
* Copyright (C) 2000 Jason M. Hanley
* Released under the GNU General Public License (GPL)
* See license.txt for additional information.
*
* Created on August 4, 2000, 1:17 AM
*/
package fate.world;
import java.io.*;
import fate.*;
import fate.util.*;
/**
* Represents a solar system containing {@link Planetoid} objects.
*
* @author preylude@s3m.com
* @version 0.1.0
*/
public class SolarSystem extends OrbitingBody implements Serializable, Cloneable {
/** Map of all planetoids in the solar systems */
public MapWorldObject mapPlanetoids;
/** Creates new SolarSystem */
public SolarSystem() {
super();
mapPlanetoids = new MapWorldObject();
}
/** Creates a clone suitable for sending from server to client */
public SolarSystem cloneForClient() {
SolarSystem clonedObject = null;
try {
clonedObject = (SolarSystem)this.clone();
} catch( CloneNotSupportedException e ) {
Debug.trace( "Error: can't clone object" );
}
// If we have a parent Galaxy, make sure it gets cloned properly
if (parent != null) {
clonedObject.parent = ((Galaxy)parent).cloneForClient();
}
clonedObject.mapPlanetoids = null;
return clonedObject;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -