public class IDComponent extends AbstractComponent implements SerializableComponent
| Constructor and Description |
|---|
IDComponent(String name,
int id)
Constructs ID component with given entity name and id.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getFullID() |
int |
getID() |
String |
getName() |
int |
hashCode() |
void |
read(com.almasb.fxgl.io.serialization.Bundle bundle) |
String |
toString() |
void |
write(com.almasb.fxgl.io.serialization.Bundle bundle) |
getEntity, onAdded, onRemovedpublic IDComponent(String name, int id)
name - string representation of entity nameid - numeric id that uniquely identifies the entity with given namepublic final String getName()
public final int getID()
public final String getFullID()
public void write(@NotNull
com.almasb.fxgl.io.serialization.Bundle bundle)
write in interface com.almasb.fxgl.io.serialization.SerializableTypepublic void read(@NotNull
com.almasb.fxgl.io.serialization.Bundle bundle)
read in interface com.almasb.fxgl.io.serialization.SerializableTypeCopyright © 2017. All rights reserved.