mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-22 07:56:52 -06:00
Update demo to use tiny-ecs 1.1-6.
This commit is contained in:
+1
-1
@@ -26,4 +26,4 @@ assets.fnt_smallhud = love.graphics.newFont("assets/font.ttf", 32)
|
||||
assets.fnt_reallysmallhud = love.graphics.newFont("assets/font.ttf", 24)
|
||||
|
||||
|
||||
return assets
|
||||
return assets
|
||||
|
||||
@@ -38,4 +38,4 @@ function Bullet:onCollision(col)
|
||||
end
|
||||
|
||||
|
||||
return Bullet
|
||||
return Bullet
|
||||
|
||||
@@ -13,4 +13,4 @@ function Explosion:init(x, y)
|
||||
self.lifetime = 9 * 0.05
|
||||
end
|
||||
|
||||
return Explosion
|
||||
return Explosion
|
||||
|
||||
@@ -17,4 +17,4 @@ function MainHud:init(levelState)
|
||||
self.hudBg = true
|
||||
end
|
||||
|
||||
return MainHud
|
||||
return MainHud
|
||||
|
||||
@@ -56,4 +56,4 @@ function Pig:gotHit()
|
||||
end
|
||||
end
|
||||
|
||||
return Pig
|
||||
return Pig
|
||||
|
||||
@@ -79,4 +79,4 @@ function Player:init(args)
|
||||
self.hasGun = true
|
||||
end
|
||||
|
||||
return Player
|
||||
return Player
|
||||
|
||||
@@ -27,4 +27,4 @@ function ScreenSplash:init(x, y, text, width, fnt, align, xo, yo)
|
||||
}
|
||||
end
|
||||
|
||||
return ScreenSplash
|
||||
return ScreenSplash
|
||||
|
||||
@@ -24,4 +24,4 @@ function Spawner:spawn()
|
||||
world:add(Pig(self.pos.x - 15, self.pos.y - 10, nil))
|
||||
end
|
||||
|
||||
return Spawner
|
||||
return Spawner
|
||||
|
||||
@@ -9,4 +9,4 @@ function TimerEvent:onLifeover()
|
||||
self.timerCallback()
|
||||
end
|
||||
|
||||
return TimerEvent
|
||||
return TimerEvent
|
||||
|
||||
@@ -29,4 +29,4 @@ function TransitionScreen:onLifeover()
|
||||
end
|
||||
end
|
||||
|
||||
return TransitionScreen
|
||||
return TransitionScreen
|
||||
|
||||
@@ -49,4 +49,4 @@ function Intro:draw()
|
||||
|
||||
end
|
||||
|
||||
return Intro
|
||||
return Intro
|
||||
|
||||
@@ -126,4 +126,4 @@ function Level:load()
|
||||
_G.world = world
|
||||
end
|
||||
|
||||
return Level
|
||||
return Level
|
||||
|
||||
@@ -23,4 +23,4 @@ function AISystem:process(e, dt)
|
||||
p.jumping = math.random() < 0.5 * dt
|
||||
end
|
||||
|
||||
return AISystem
|
||||
return AISystem
|
||||
|
||||
@@ -102,4 +102,4 @@ function BumpPhysicsSystem:onRemove(e)
|
||||
self.bumpWorld:remove(e)
|
||||
end
|
||||
|
||||
return BumpPhysicsSystem
|
||||
return BumpPhysicsSystem
|
||||
|
||||
@@ -24,4 +24,4 @@ function CameraTrackingSystem:onAdd(e)
|
||||
self.camera:setPosition(round(x), round(y))
|
||||
end
|
||||
|
||||
return CameraTrackingSystem
|
||||
return CameraTrackingSystem
|
||||
|
||||
@@ -11,4 +11,4 @@ function DrawBackgroundSystem:update(dt)
|
||||
love.graphics.setColor(r1, g1, b1, a)
|
||||
end
|
||||
|
||||
return DrawBackgroundSystem
|
||||
return DrawBackgroundSystem
|
||||
|
||||
@@ -6,4 +6,4 @@ function FadeSystem:process(e, dt)
|
||||
e.alpha = math.min(1, math.max(0, e.alpha - dt / e.fadeTime))
|
||||
end
|
||||
|
||||
return FadeSystem
|
||||
return FadeSystem
|
||||
|
||||
@@ -8,4 +8,4 @@ function HudSystem:process(e, dt)
|
||||
e:drawHud(dt)
|
||||
end
|
||||
|
||||
return HudSystem
|
||||
return HudSystem
|
||||
|
||||
@@ -12,4 +12,4 @@ function LifetimeSystem:process(e, dt)
|
||||
end
|
||||
end
|
||||
|
||||
return LifetimeSystem
|
||||
return LifetimeSystem
|
||||
|
||||
@@ -37,4 +37,4 @@ function PlatformingSystem:process(e, dt)
|
||||
e.animation = platforming.moving and e.animation_walk or e.animation_stand
|
||||
end
|
||||
|
||||
return PlatformingSystem
|
||||
return PlatformingSystem
|
||||
|
||||
@@ -47,4 +47,4 @@ function PlayerControlSystem:process(e, dt)
|
||||
end
|
||||
end
|
||||
|
||||
return PlayerControlSystem
|
||||
return PlayerControlSystem
|
||||
|
||||
@@ -34,4 +34,4 @@ function SpawnSystem:onRemove(e)
|
||||
self.levelState.spawnerCount = self.levelState.spawnerCount - 1
|
||||
end
|
||||
|
||||
return SpawnSystem
|
||||
return SpawnSystem
|
||||
|
||||
@@ -33,4 +33,4 @@ function SpriteSystem:process(e, dt)
|
||||
end
|
||||
end
|
||||
|
||||
return SpriteSystem
|
||||
return SpriteSystem
|
||||
|
||||
@@ -13,4 +13,4 @@ function TileMapRenderSystem:update(dt)
|
||||
self.camera:draw(self.drawFn)
|
||||
end
|
||||
|
||||
return TileMapRenderSystem
|
||||
return TileMapRenderSystem
|
||||
|
||||
@@ -6,4 +6,4 @@ function UpdateSystem:process(e, dt)
|
||||
e:update(dt)
|
||||
end
|
||||
|
||||
return UpdateSystem
|
||||
return UpdateSystem
|
||||
|
||||
@@ -22,4 +22,4 @@ function WaveSystem:onRemove(e)
|
||||
end
|
||||
end
|
||||
|
||||
return WaveSystem
|
||||
return WaveSystem
|
||||
|
||||
Reference in New Issue
Block a user