Class DefaultIsoGameObject<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Field Detail

      • Z

        @NotNull
        public static final @NotNull java.lang.String Z
        The name of the "z" attribute.
        See Also:
        Constant Field Values
      • LAYER

        @NotNull
        public static final @NotNull java.lang.String LAYER
        The name of the "layer" attribute.
        See Also:
        Constant Field Values
      • SUB_LAYER

        @NotNull
        public static final @NotNull java.lang.String SUB_LAYER
        The name of the "sub_layer" attribute.
        See Also:
        Constant Field Values
      • SYS_OBJECT

        @NotNull
        public static final @NotNull java.lang.String SYS_OBJECT
        The name of the "sys_object" attribute.
        See Also:
        Constant Field Values
      • DRAW_DOUBLE_ALWAYS

        @NotNull
        public static final @NotNull java.lang.String DRAW_DOUBLE_ALWAYS
        The name of the "draw_double_always" attribute.
        See Also:
        Constant Field Values
      • DRAW_DOUBLE

        @NotNull
        public static final @NotNull java.lang.String DRAW_DOUBLE
        The name of the "draw_double" attribute.
        See Also:
        Constant Field Values
      • ALIGN

        @NotNull
        public static final @NotNull java.lang.String ALIGN
        The name of the "align" attribute.
        See Also:
        Constant Field Values
      • ZOOM

        @NotNull
        public static final @NotNull java.lang.String ZOOM
        The name of the "zoom" attribute.
        See Also:
        Constant Field Values
      • ALPHA

        @NotNull
        public static final @NotNull java.lang.String ALPHA
        The name of the "alpha" attribute.
        See Also:
        Constant Field Values
      • ROTATE

        @NotNull
        public static final @NotNull java.lang.String ROTATE
        The name of the "rotate" attribute.
        See Also:
        Constant Field Values
      • GLOW_RADIUS

        @NotNull
        public static final @NotNull java.lang.String GLOW_RADIUS
        The name of the "glow_radius" attribute.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultIsoGameObject

        protected DefaultIsoGameObject​(@NotNull
                                       R archetype,
                                       @NotNull
                                       @NotNull FaceObjectProviders faceObjectProviders,
                                       @NotNull
                                       @NotNull AnimationObjects animationObjects)
        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
    • Method Detail

      • usesDirection

        public boolean usesDirection()
        Description copied from interface: BaseObject
        Return whether this base object uses the "direction" attribute.
        Returns:
        whether this base object uses the "direction" attribute
      • getTransparentImage

        @NotNull
        public @NotNull javax.swing.Icon getTransparentImage()
        Returns a transparent variant of the face for this GameObject.
        Returns:
        the transparent face for this game object
      • getDoubleImage

        @NotNull
        public @NotNull javax.swing.Icon getDoubleImage()
        Returns a double variant of the face for this GameObject.
        Returns:
        the double face for this game object
      • getTransparentDoubleImage

        @NotNull
        public @NotNull javax.swing.Icon getTransparentDoubleImage()
        Returns a transparent variant of the face for this GameObject.
        Returns:
        the transparent face for this game object
      • getYOffset

        public final int getYOffset()
        Acquire Y offset of the object for rendering purposes.
        Returns:
        the y offset.
      • refreshStretchFactor

        public final void refreshStretchFactor()
        Invalidates stretch factor value calculated by getStretchFactor() and clears the stored stretched face.
      • getStretchFactor

        public final long getStretchFactor()
        Acquire stretch factor of the object. As the calculation is costly, the value will be stored until the next call to refreshStretchFactor()
        Returns:
        the stretch factor
      • getStretchedImage

        @NotNull
        public @NotNull javax.swing.Icon getStretchedImage​(long stretchFactor)
        Returns a stretched variant of the face for this floor-type GameObject.
        Returns:
        the stretched face for this game object
      • isDrawDouble

        public abstract boolean isDrawDouble​(boolean drawDoubleFaces)
        Returns whether to draw this game object with double height.
        Parameters:
        drawDoubleFaces - whether the "draw double faces" map view setting is enabled
        Returns:
        whether to draw this game object with double height
      • isStretched

        public abstract boolean isStretched​(boolean tileStretching)
        Returns whether to draw this game object with stretching transformation.
        Parameters:
        tileStretching - whether the "tile-stretching" map view setting is enabled
        Returns:
        whether to draw this game object with stretching transformation