naming conventions act 2: the end
This commit is contained in:
@@ -30,6 +30,11 @@ function Entity:new(x,y)
|
||||
return o
|
||||
end
|
||||
|
||||
function Entity:id()
|
||||
table.insert(LoadedObjects.Entities,self)
|
||||
self.id = #LoadedObjects.Entities
|
||||
end
|
||||
|
||||
function Entity:checkNearest(type,maxdistance)
|
||||
local return_entity = nil
|
||||
local shortest = -1
|
||||
@@ -107,7 +112,7 @@ function Entity:checkVisionLine(entity,range)
|
||||
local distance_x = target_x - self.pos.x
|
||||
local distance_y = target_y - self.pos.y
|
||||
|
||||
local angle = GetAngleFromVector(distance_x,distance_y)
|
||||
local angle = getAngleFromVector(distance_x,distance_y)
|
||||
local distance = math.sqrt(distance_x ^ 2 + distance_y ^ 2)
|
||||
|
||||
local is_colliding = true
|
||||
@@ -211,7 +216,7 @@ function Entity:checkVisionLineDebug(entity,range)
|
||||
local distance_x = target_x - self.pos.x
|
||||
local distance_y = target_y - self.pos.y
|
||||
|
||||
local angle = GetAngleFromVector(distance_x,distance_y)
|
||||
local angle = getAngleFromVector(distance_x,distance_y)
|
||||
local distance = math.sqrt(distance_x ^ 2 + distance_y ^ 2)
|
||||
|
||||
if distance < range then
|
||||
|
||||
Reference in New Issue
Block a user