fix/workaround: removed glitches with scaling and quads
[uboot.git] / sonar.lua
blob24801d7c51cd01c374497ba3a091e48dca9bc42f
1 Sonarbubble = {}
3 --[[
4 Sonarbubble constructor
5 Use this with parameters x,y,size
6 ]]--
7 function Sonarbubble:new(o)
8 setmetatable(o, self)
9 self.__index = self
10 return o
11 end
13 function Sonarbubble:followEntity(hauntedEntity)
14 self.follow = true
15 self.hauntedEntity = hauntedEntity
16 end
18 function sonar_update()
19 for i,s in ipairs(sonarbubbles) do
20 if s.follow then
21 s.x = entities[s.hauntedEntity].body:getX()
22 s.y = entities[s.hauntedEntity].body:getY()
23 end
24 end
25 end