Class GameObject

    • Field Detail

      • ELEVATION

        @NotNull
        public static final @NotNull java.lang.String ELEVATION
        The name of the "elevation" attribute.
        See Also:
        Constant Field Values
      • INVISIBLE

        @NotNull
        public static final @NotNull java.lang.String INVISIBLE
        The name of the "invisible" attribute.
        See Also:
        Constant Field Values
      • SMOOTHLEVEL

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

      • GameObject

        public GameObject​(@NotNull
                          @NotNull Archetype 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

      • 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[] 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
      • 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
      • 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