Is it cat town? perhaps
This commit is contained in:
30
cat-town/src/index.ts
Normal file
30
cat-town/src/index.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Engine, Loader, DisplayMode } from 'excalibur'
|
||||
import { Beginning } from './scenes/beginning'
|
||||
import { Player } from './actors/player'
|
||||
import { Resources } from './resources'
|
||||
|
||||
class Game extends Engine {
|
||||
private player: Player
|
||||
private beginning: Beginning
|
||||
|
||||
constructor() {
|
||||
super({ displayMode: DisplayMode.FitScreen })
|
||||
}
|
||||
|
||||
public start() {
|
||||
this.beginning = new Beginning()
|
||||
this.player = new Player()
|
||||
this.beginning.add(this.player)
|
||||
|
||||
game.add('beginning', this.beginning)
|
||||
|
||||
const loader = new Loader(Object.values(Resources))
|
||||
|
||||
return super.start(loader)
|
||||
}
|
||||
}
|
||||
|
||||
const game = new Game()
|
||||
game.start().then(() => {
|
||||
game.goToScene('beginning')
|
||||
})
|
||||
Reference in New Issue
Block a user