Package de.extio.spacecraft.shared.bo
Interface SpaceCraftFactory
-
public interface SpaceCraftFactory
Factory for spacecrafts You can access the corresponding bean implementation via EngineFacade::getBusinessObject / ServerFacade::getBusinessObject
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends SpaceCraft>
Tcreate(Class<T> convertTo, SpaceCraft template, Map<String,Object> spaceCraftProperties)
Properly sets up a new SpaceCraft, template and spaceCraftProperties are usually taken from CompositeEntityDefinitionMessage.<T extends SpaceCraft>
Tcreate(Class<T> convertTo, CompositeEntityDefinitionMessage defMessage)
Properly sets up a new SpaceCraft from CompositeEntityDefinitionMessage.
-
-
-
Method Detail
-
create
<T extends SpaceCraft> T create(Class<T> convertTo, CompositeEntityDefinitionMessage defMessage)
Properly sets up a new SpaceCraft from CompositeEntityDefinitionMessage. It returns a copy, converted to target type.
Conversion
For example a SpaceCraft type that is loaded from storage can be converted to SpaceShip. Also the opposite direction is possible, e.g. a SpaceStation loaded from storage can be converted to a SpaceCraft which AI operates.
Post-setup, to be implemented by invoker:
* Set position
* Optionally set team
* Put to world manager
* SpaceCraft type can be spawned without having it assigned to a ship slot. When creating a SpaceShip or one of it's sub-classes, you need to get it assigned to a ship slot by server game session manager immediately after! Use InternalGameSessionControlMessage.
-
create
<T extends SpaceCraft> T create(Class<T> convertTo, SpaceCraft template, Map<String,Object> spaceCraftProperties)
Properly sets up a new SpaceCraft, template and spaceCraftProperties are usually taken from CompositeEntityDefinitionMessage. It returns a copy, converted to target type.
Conversion
For example a SpaceCraft type that is loaded from storage can be converted to SpaceShip. Also the opposite direction is possible, e.g. a SpaceStation loaded from storage can be converted to a SpaceCraft which AI operates.
Post-setup, to be implemented by invoker:
* Set position
* Optionally set team
* Put to world manager
* SpaceCraft type can be spawned without having it assigned to a ship slot. When creating a SpaceShip or one of it's sub-classes, you need to get it assigned to a ship slot by server game session manager immediately after! Use InternalGameSessionControlMessage.
-
-