added Vue
This commit is contained in:
parent
d93a5fd6a1
commit
2d7ab30ec6
36 changed files with 15930 additions and 2884 deletions
59
frontend/game/model/Position.ts
Normal file
59
frontend/game/model/Position.ts
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* 2D Point.
|
||||
*/
|
||||
class Position {
|
||||
/**
|
||||
* X coordinate.
|
||||
* @private
|
||||
*/
|
||||
private _x: number;
|
||||
|
||||
/**
|
||||
* Y coordinate.
|
||||
* @private
|
||||
*/
|
||||
private _y: number;
|
||||
|
||||
//region Getter & Setter
|
||||
|
||||
/**
|
||||
* Get x.
|
||||
*/
|
||||
get x(): number {
|
||||
return this._x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set x.
|
||||
* @param value
|
||||
*/
|
||||
set x(value: number) {
|
||||
this._x = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get y.
|
||||
*/
|
||||
get y(): number {
|
||||
return this._y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set y.
|
||||
* @param value
|
||||
*/
|
||||
set y(value: number) {
|
||||
this._y = value;
|
||||
}
|
||||
//endregion
|
||||
|
||||
/**
|
||||
* Constructs the position.
|
||||
* @param x x-Position
|
||||
* @param y y-Position
|
||||
*/
|
||||
constructor(x: number, y: number) {
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue