Movable

scalata.domain.entities.components.Movable
trait Movable[E <: Movable[E]]

Capability mix-in for entities that can change their position.

==== Contract ====

  • position – current tile coordinate.

  • move – returns a new instance at a different Point2D; never mutates in place.

Type parameters

E

concrete entity type that implements the trait

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Enemy
class Player

Members list

Value members

Abstract methods

def move(pos: Point2D): E

Produce a copy of the entity at pos.

Produce a copy of the entity at pos.

Attributes

Abstract fields