Class GameObject

    • Constructor Detail

      • GameObject

        public GameObject​(@NotNull
                          @NotNull Archetype archetype,
                          @NotNull
                          @NotNull FaceObjectProviders faceObjectProviders,
                          @NotNull
                          @NotNull AnimationObjects animationObjects,
                          @NotNull
                          @NotNull ArchetypeTypeSet archetypeTypeSet)
        Creates a new instance.
        Parameters:
        archetype - the base archetype
        faceObjectProviders - the face object providers for looking up faces
        animationObjects - the animation objects for looking up animations
        archetypeTypeSet - the archetype type set for looking up archetype types
    • Method Detail

      • propagateElevation

        public void propagateElevation​(@NotNull
                                       @NotNull BaseObject<?,​?,​?,​?> gameObject)
        Description copied from interface: GameObject
        If there is elevation data in the other game object, move it to here.
        Parameters:
        gameObject - the other game object
      • updateTileStretch

        public void updateTileStretch​(int heightValue,
                                      boolean isAbsolute,
                                      @NotNull
                                      @NotNull java.lang.Integer @Nullable [] subLayers)
        Description copied from interface: GameObject
        Updates the tile stretching value of the selected object.
        Parameters:
        heightValue - height value
        isAbsolute - whether the height change value is absolute or relative
        subLayers - sub-layers to affect or null to affect all layers
      • applyMassChange

        public void applyMassChange​(@NotNull
                                    @NotNull java.lang.Integer @NotNull [] layers,
                                    @NotNull
                                    @NotNull java.lang.Integer @NotNull [] subLayers,
                                    @NotNull
                                    @NotNull java.lang.String changes)
        Description copied from interface: GameObject
        Applies mass changes to the specified object if all the match conditions are met.
        Parameters:
        layers - layers to match, can be empty
        subLayers - sub-layers to match, can be empty
        changes - changes to apply
      • isDrawDouble

        public boolean isDrawDouble​(boolean drawDoubleFaces)
        Description copied from class: DefaultIsoGameObject
        Returns whether to draw this game object with double height.
        Specified by:
        isDrawDouble in class DefaultIsoGameObject<GameObject,​MapArchObject,​Archetype>
        Parameters:
        drawDoubleFaces - whether the "draw double faces" map view setting is enabled
        Returns:
        whether to draw this game object with double height
      • isStretched

        public boolean isStretched​(boolean tileStretching)
        Description copied from class: DefaultIsoGameObject
        Returns whether to draw this game object with stretching transformation.
        Specified by:
        isStretched in class DefaultIsoGameObject<GameObject,​MapArchObject,​Archetype>
        Parameters:
        tileStretching - whether the "tile-stretching" map view setting is enabled
        Returns:
        whether to draw this game object with stretching transformation
      • isScripted

        public boolean isScripted()
        Description copied from interface: GameObject
        Returns whether this GameObject has one or more scripted events defined.
        Returns:
        true if this GameObject has one or more scripted events, otherwise false
      • getLightRadius

        public int getLightRadius()
        Description copied from interface: GameObject
        Returns the effective light radius of this game object.
        Returns:
        the effective light radius or 0 if this object does not emit light