/zoeplat

To get this branch, use:
bzr branch http://9ix.org/bzr/zoeplat

« back to all changes in this revision

Viewing changes to zoetrope/sprites/tile.lua

  • Committer: Josh C
  • Date: 2013-03-05 22:11:55 UTC
  • Revision ID: josh@9ix.org-20130305221155-hva5q53evnqqfn58
build script to build .love file

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
        -- image must be a nonsense value, not nil,
23
23
        -- for the tile to see that an image has been set if it
24
24
        -- was initially nil
25
 
        _set = { image = -1 },
 
25
        _set = { image = -1, imageOffset = { x = 0, y = 0 } },
26
26
 
27
27
        -- private property imageObj: actual Image instance used to draw
28
28
        -- this is normally set via the image property, but you may set it directly
31
31
        new = function (self, obj)
32
32
                obj = obj or {}
33
33
                self:extend(obj)
34
 
                obj._set.imageOffset = {}
35
34
                
36
35
                if obj.image then obj:updateQuad() end
37
36
                if obj.onNew then obj:onNew() end