Created
April 3, 2014 16:41
-
-
Save cigumo/9958088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Engine = class('Engine') | |
function Engine:initialize() | |
-- ... | |
self:register_signals() | |
end | |
function Engine:pan_camera(dx,dy) | |
-- moves the camera using self.camera | |
end | |
function Engine:register_signals() | |
local e = self | |
signal.register(CMD_PAN_MAP, function(dx,dy) e:pan_camera(dx,dy)) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment