Added width and height fields, init fix
This commit is contained in:
@ -14,6 +14,12 @@ export class BaseSprite extends BaseEntity {
|
||||
@OneToMany({ mappedBy: 'sprite', orphanRemoval: true })
|
||||
spriteActions = new Collection<SpriteAction>(this)
|
||||
|
||||
@Property()
|
||||
width: number = 0
|
||||
|
||||
@Property()
|
||||
height: number = 0
|
||||
|
||||
@Property()
|
||||
createdAt = new Date()
|
||||
|
||||
@ -47,6 +53,24 @@ export class BaseSprite extends BaseEntity {
|
||||
return this.spriteActions
|
||||
}
|
||||
|
||||
setWidth(width: number) {
|
||||
this.width = width
|
||||
return this
|
||||
}
|
||||
|
||||
getWidth() {
|
||||
return this.width
|
||||
}
|
||||
|
||||
setHeight(height: number) {
|
||||
this.height = height
|
||||
return this
|
||||
}
|
||||
|
||||
getHeight() {
|
||||
return this.height
|
||||
}
|
||||
|
||||
setCreatedAt(createdAt: Date) {
|
||||
this.createdAt = createdAt
|
||||
return this
|
||||
|
Reference in New Issue
Block a user