arx-tools/arx-level-generator

introduce a common interface for all classes that can be used by the Selection class

Closed this issue · 1 comments

The abstract Selection class expects its generic class to have a move() method:

export abstract class Selection<T extends { move: (offset: Vector3) => void }[]> {

The copy() method of the subclasses also expect the generic classes to have a clone() method.

These all could be summarized with an interface which the Polygons, Lights, Entities, Fogs, Paths and Zones would need to implement. Something like this:

interface Selectable {
  move(offset: Vector3): void
  clone(): this
}