Uses of Record Class
dev.twilite.game.common.Rect
Packages that use Rect
Package
Description
-
Uses of Rect in dev.twilite.game.common
Methods in dev.twilite.game.common that return RectModifier and TypeMethodDescriptionCoord.area()Returns this coordinate as a one-tile area.static RectWorldEntitySpace.area(dev.twilite.cache.definition.WorldEntityDefinition definition, World world, Coord.Fine origin, float radians) Returns the root-world area occupied by a world entity definition.Rect.dx(int x) Returns this area offset on the x-axis.Rect.dy(int y) Returns this area offset on the y-axis.Rect.expanded(int radius) Returns this area expanded equally in every direction.Rect.expanded(int xRadius, int yRadius) Returns this area expanded by the supplied x/y radii.static RectCreates an area starting atcoord.Rect.toInstance()Converts this template area to its matching loaded instance area.Rect.toTemplate()Converts this loaded instance area to its source template area.Rect.transform(UnaryOperator<Coord> transform) Transforms all coords in a rect and returns the transformed rectRect.translate(int x, int y) Returns this area offset by the supplied x/y deltas.Methods in dev.twilite.game.common that return types with arguments of type RectModifier and TypeMethodDescriptionRect.intersection(Rect rect) Returns the overlapping area shared with another area on the same floor.Returns the smallest area that contains this area and another area on the same floor.Methods in dev.twilite.game.common with parameters of type RectModifier and TypeMethodDescriptionbooleanReturns whether this area fully contains another area.Coord.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this coordinate to an area in the currently loaded world.Rect.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this area to another area in the currently loaded world.intCoord.distanceTo(Rect rect) Returns Chebyshev tile distance to an area.intRect.distanceTo(Rect rect) Returns Chebyshev tile distance between this area and another area.Rect.intersection(Rect rect) Returns the overlapping area shared with another area on the same floor.booleanRect.intersects(Rect rect) Returns whether this area overlaps another area on the same floor.booleanCoord.lineOfSightTo(Rect rect) Returns whether line of sight is clear from this coordinate to an area in the currently loaded world.booleanRect.lineOfSightTo(Rect rect) Returns whether line of sight is clear from this area to another area in the currently loaded world.booleanCoord.lineOfWalkTo(Rect rect) Returns whether a direct line of walk is clear from this coordinate to an area in the currently loaded world.booleanRect.lineOfWalkTo(Rect rect) Returns whether a direct line of walk is clear from this area to another area in the currently loaded world.intCoord.manhattanDistanceTo(Rect rect) Returns Manhattan/taxicab tile distance to an area.intRect.manhattanDistanceTo(Rect rect) Returns Manhattan/taxicab tile distance between this area and another area.Returns the smallest area that contains this area and another area on the same floor. -
Uses of Rect in dev.twilite.game.facade
Methods in dev.twilite.game.facade that return RectModifier and TypeMethodDescriptionstatic RectAvatar.area()Returns the local player's occupied area, or a one-tile null area when unavailable.Methods in dev.twilite.game.facade with parameters of type RectModifier and TypeMethodDescriptionstatic intAvatar.distanceTo(Rect rect) Returns Chebyshev distance from the local player to a rectangle, orInteger.MAX_VALUEwhen unavailable.static booleanAvatar.lineOfSightTo(Rect rect) Returns whether the local player has line of sight to a rectangle.static booleanAvatar.lineOfWalkTo(Rect rect) Returns whether the local player has line of walk to a rectangle.static intAvatar.manhattanDistanceTo(Rect rect) Returns Manhattan distance from the local player to a rectangle, orInteger.MAX_VALUEwhen unavailable. -
Uses of Rect in dev.twilite.game.simulation.model.combat
Methods in dev.twilite.game.simulation.model.combat that return RectModifier and TypeMethodDescriptionSimulationCombatState.player()Returns the value of theplayerrecord component.SimulationHit.target()Returns the value of thetargetrecord component.Methods in dev.twilite.game.simulation.model.combat with parameters of type RectModifier and TypeMethodDescriptionSimulationCombatState.Prediction.predict(SimulationCombatState state, SimulationEntity entity, Rect target, SimulationCollision collision) Returns the entity state after one simulated tick.static SimulationCombatStateSimulationCombatState.start(Rect player, List<SimulationEntity> entities) Creates an initial combat state.Advances combat by one tick after moving the player totarget.SimulationCombatState.step(Rect target, SimulationCombatState.Prediction prediction, SimulationEntity.LineOfSight<? super SimulationCombatState> lineOfSight) Advances combat by one tick after moving the player totarget.Constructors in dev.twilite.game.simulation.model.combat with parameters of type RectModifierConstructorDescriptionSimulationCombatState(Rect player, List<SimulationEntity> entities, SimulationTimeline timeline, int tick) Creates an instance of aSimulationCombatStaterecord class.SimulationHit(int tick, Rect target, List<SimulationEntity> sources, List<SimulationEntity> states) Creates an instance of aSimulationHitrecord class. -
Uses of Rect in dev.twilite.game.simulation.model.entity
Methods in dev.twilite.game.simulation.model.entity that return RectModifier and TypeMethodDescriptionSimulationEntity.area()Returns the value of thearearecord component.Methods in dev.twilite.game.simulation.model.entity with parameters of type RectModifier and TypeMethodDescriptionbooleanReturns whether an area intersects any tracked entity exceptselfId.booleanReturns whether this entity can currently attack a target area.static SimulationEntityCreates a walking melee entity with a normal attack cycle.Returns a copy at a new occupied area.SimulationEntity.predictToward(Rect target) Predicts this entity moving directly toward the target for one tick.booleanReturns whethersourcecan seetarget.Constructors in dev.twilite.game.simulation.model.entity with parameters of type RectModifierConstructorDescriptionSimulationEntity(int id, Rect area, MoveSpeed moveSpeed, int attackRange, int attackCycle, int attackCooldown, int movementBlockTicks, int expiresIn, boolean melee, boolean ignoreEntityCollision, boolean hitsInside, boolean walksToYouAnyway) Creates an instance of aSimulationEntityrecord class. -
Uses of Rect in dev.twilite.game.simulation.model.threat
Methods in dev.twilite.game.simulation.model.threat that return RectModifier and TypeMethodDescriptionSimulationAreaThreat.area()Returns the value of thearearecord component.SimulationAreaThreat.Builder.area()Returns the value of thearearecord component.Methods in dev.twilite.game.simulation.model.threat with parameters of type RectModifier and TypeMethodDescriptionstatic SimulationAreaThreatSimulationAreaThreat.area(int id, Rect area, int startTick, int duration, int penalty, boolean avoid) Creates an area threat with an explicit source id.static SimulationAreaThreatCreates a one-tick area threat that is not tied to a specific source id.static SimulationAreaThreatCreates an area threat that is not tied to a specific source id.static SimulationAreaThreatCreates a one-tick area threat that should be avoided as a final destination.static SimulationAreaThreatCreates an area threat that should be avoided as a final destination.static SimulationAreaThreat.BuilderStarts a builder for an area threat.Constructors in dev.twilite.game.simulation.model.threat with parameters of type RectModifierConstructorDescriptionCreates an instance of aBuilderrecord class.SimulationAreaThreat(int id, Rect area, int startTick, int penalty, boolean avoid) Creates a one-tick area threat.SimulationAreaThreat(int id, Rect area, int startTick, int duration, int penalty, boolean avoid) Creates an instance of aSimulationAreaThreatrecord class. -
Uses of Rect in dev.twilite.game.simulation.rules.blocking
Method parameters in dev.twilite.game.simulation.rules.blocking with type arguments of type RectModifier and TypeMethodDescriptionstatic <I> SimulationTask<I> Blocked.areas(Function<I, ? extends Collection<Rect>> areas) Blocks every node contained by any supplied area before path expansion. -
Uses of Rect in dev.twilite.game.simulation.rules.combat
Methods in dev.twilite.game.simulation.rules.combat with parameters of type RectModifier and TypeMethodDescriptionEntityCombat.Prediction.predict(I input, SimulationEntity entity, Rect target, int tick, SimulationCollision collision) Returns the predicted entity state. -
Uses of Rect in dev.twilite.game.simulation.rules.preference
Methods in dev.twilite.game.simulation.rules.preference that return types with arguments of type RectModifier and TypeMethodDescriptionFunction<I, ? extends Collection<Rect>> AreaPreference.Builder.areas()Returns the value of theareasrecord component.Function<I, ? extends Collection<Rect>> AreaPreference.ScoreBuilder.areas()Returns the value of theareasrecord component.Method parameters in dev.twilite.game.simulation.rules.preference with type arguments of type RectModifier and TypeMethodDescriptionstatic <I> AreaPreference.Builder<I> Starts a preference builder for one preferred area.static <I> AreaPreference.Builder<I> AreaPreference.nearestOf(Function<I, ? extends Collection<Rect>> areas) Starts a preference builder for multiple preferred areas.Constructor parameters in dev.twilite.game.simulation.rules.preference with type arguments of type RectModifierConstructorDescriptionBuilder(Function<I, ? extends Collection<Rect>> areas) Creates an instance of aBuilderrecord class.ScoreBuilder(Function<I, ? extends Collection<Rect>> areas, int score) Creates an instance of aScoreBuilderrecord class. -
Uses of Rect in dev.twilite.game.stream
Methods in dev.twilite.game.stream with parameters of type Rect -
Uses of Rect in dev.twilite.game.trait
Methods in dev.twilite.game.trait that return RectMethods in dev.twilite.game.trait with parameters of type RectModifier and TypeMethodDescriptionUnit.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this unit to an area in the currently loaded world.default intUnit.distanceTo(Rect rect) Returns Chebyshev tile distance from this unit's occupied area to an area.default booleanUnit.lineOfSightTo(Rect rect) Returns whether line of sight is clear from this unit to an area in the currently loaded world.default booleanUnit.lineOfWalkTo(Rect rect) Returns whether a direct line of walk is clear from this unit to an area in the currently loaded world.default intUnit.manhattanDistanceTo(Rect rect) Returns Manhattan/taxicab tile distance from this unit's occupied area to an area. -
Uses of Rect in dev.twilite.game.wrapper
Methods in dev.twilite.game.wrapper that return Rect