diff options
author | Aki <nthirtyone@gmail.com> | 2017-08-13 02:26:55 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-08-13 02:26:55 +0200 |
commit | b1cf14d64a2d3e28683db87190c4b2c7799c259d (patch) | |
tree | e45dac5cc6ce5265e3e3e2c914eb7cc92a820b8b /not/Entity.lua | |
parent | 0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (diff) | |
parent | ed62b573417bdc85bec616f6016846b02de4c906 (diff) | |
download | roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.zip roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.gz roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.bz2 |
Merge branch 'multi'maps
Diffstat (limited to 'not/Entity.lua')
-rw-r--r-- | not/Entity.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/not/Entity.lua b/not/Entity.lua new file mode 100644 index 0000000..0e21e48 --- /dev/null +++ b/not/Entity.lua @@ -0,0 +1,17 @@ +require "not.Sprite" + +--- `Entity` +-- Basic, visible object to be used within World instance. Can be anything. Represented as `Sprite`. +-- We still need to keep old, global way of using modules but there are `returns` on the end at least. +-- It probably would be nice to move `World` dependency out of it but for now it should stay this way. Later `World` instance could be just passed to methods that need it. +Entity = Sprite:extends() + +Entity.world =--[[not.World]]nil + +-- Simple constructor for `Entity`. +function Entity:new (world, imagePath) + Entity.__super.new(self, imagePath) + self.world = world +end + +return Entity |