diff options
author | Aki <nthirtyone@gmail.com> | 2017-05-26 19:14:27 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-05-26 19:14:27 +0200 |
commit | 62b67be7882dffebd6de0c8241d253d806a6905c (patch) | |
tree | 4b4bc483d4a95f5cb02cc33e41a5600c28cfb49b /not/Entity.lua | |
parent | afac3fdc7ce03e03304eec448149f346099cab94 (diff) | |
download | roflnauts-62b67be7882dffebd6de0c8241d253d806a6905c.zip roflnauts-62b67be7882dffebd6de0c8241d253d806a6905c.tar.gz roflnauts-62b67be7882dffebd6de0c8241d253d806a6905c.tar.bz2 |
Halfway through with moving to new OOP module
Diffstat (limited to 'not/Entity.lua')
-rw-r--r-- | not/Entity.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/not/Entity.lua b/not/Entity.lua new file mode 100644 index 0000000..6ba1606 --- /dev/null +++ b/not/Entity.lua @@ -0,0 +1,16 @@ +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. +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 |