mirror of
https://github.com/SleepingInsomniac/pixelfaucet
synced 2025-01-06 05:24:17 +01:00
27 lines
423 B
Crystal
27 lines
423 B
Crystal
require "../src/game"
|
|
require "../src/emitter"
|
|
|
|
module PF
|
|
class Example < Game
|
|
@emitter : Emitter
|
|
|
|
def initialize(*args, **kwargs)
|
|
super
|
|
|
|
@emitter = Emitter.new
|
|
@emitter.position = viewport / 2
|
|
end
|
|
|
|
def update(dt, event)
|
|
@emitter.update(dt)
|
|
end
|
|
|
|
def draw
|
|
clear(0, 0, 0)
|
|
@emitter.draw(self)
|
|
end
|
|
end
|
|
end
|
|
|
|
example = PF::Example.new(200, 200, 2)
|
|
example.run!
|