Class EntityGadget


public class EntityGadget extends EntityBaseGadget
  • Constructor Details

  • Method Details

    • updateState

      public void updateState(int state)
    • setContent

      @Deprecated(forRemoval=true) public void setContent(GadgetContent content)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • buildContent

      public void buildContent()
    • onInteract

      public void onInteract(Player player, GadgetInteractReqOuterClass.GadgetInteractReq interactReq)
      Description copied from class: GameEntity
      Called when a player interacts with this entity
      Overrides:
      onInteract in class GameEntity
      Parameters:
      player - Player that is interacting with this entity
      interactReq - Interact request protobuf data
    • onCreate

      public void onCreate()
      Description copied from class: GameEntity
      Called when this entity is added to the world
      Overrides:
      onCreate in class GameEntity
    • onDeath

      public void onDeath(int killerId)
      Description copied from class: GameEntity
      Called when this entity dies
      Overrides:
      onDeath in class EntityBaseGadget
      Parameters:
      killerId - Entity id of the entity that killed this entity
    • toProto

      Specified by:
      toProto in class GameEntity
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getGadgetData

      public GadgetData getGadgetData()
    • getGadgetId

      public int getGadgetId()
      Specified by:
      getGadgetId in class EntityBaseGadget
    • setGadgetId

      public void setGadgetId(int gadgetId)
    • getState

      public int getState()
    • setState

      public void setState(int state)
    • getPointType

      public int getPointType()
    • setPointType

      public void setPointType(int pointType)
    • getContent

      public GadgetContent getContent()
    • getFightProperties

      public it.unimi.dsi.fastutil.ints.Int2FloatMap getFightProperties()
      Specified by:
      getFightProperties in class GameEntity
    • getMetaGadget

      public SceneGadget getMetaGadget()
    • setMetaGadget

      public void setMetaGadget(SceneGadget metaGadget)
    • getConfigGadget

      @Nullable public ConfigGadget getConfigGadget()