Added width and height fields, init fix

This commit is contained in:
2025-02-20 00:44:36 +01:00
parent b673e7a176
commit d6681f9af7
4 changed files with 259 additions and 6 deletions

View File

@ -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