19 lines
299 B
TypeScript
19 lines
299 B
TypeScript
import { Component } from "$/common/ecs/component.ts";
|
|
|
|
export class Position extends Component {
|
|
x: number;
|
|
y: number;
|
|
z: number;
|
|
|
|
constructor(x: number, y: number, z = 0) {
|
|
super();
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
}
|
|
|
|
clone() {
|
|
return new Position(this.x, this.y, this.z);
|
|
}
|
|
}
|