CabinGame/Program/src/Components/position.ts
Ronja b83024ded6 different UI for player inspection and adventure planning
also tons of tiny linter changes I guess
2020-04-24 15:01:39 +02:00

17 lines
450 B
TypeScript

import { Point } from "../Datatypes/MathTypes/point"
import { Component } from "ecsy"
// Position component
export class Position extends Component {
value: Point
//position is used so often copy is performance sensitive I assume???
//this can crash with wrong values, but I trust my code enough to pass ONE variable
copy(values: any) {
this.value = values.value
}
reset() {
this.value = new Point(0, 0)
}
}