Skip to main content
Skip to main content

FerryActivatable

FerryActivatable

Functions

getDistance

Description

Definition

getDistance()

Arguments

anyposX
anyposY
anyposZ

Code

function FerryActivatable:getDistance(posX, posY, posZ)
local x, _, z = getWorldTranslation( self.trigger)
local distance = MathUtil.vector2Length(posX - x, posZ - z)
return distance
end

getIsActivatable

Description

Definition

getIsActivatable()

Code

function FerryActivatable:getIsActivatable()
if self.ferry:getCanActivateDriving() then
return true
end

return false
end

new

Description

Definition

new()

Arguments

anyferry

Code

function FerryActivatable.new(ferry)
local self = setmetatable( { } , FerryActivatable _mt)

self.ferry = ferry
self.trigger = nil

self.activateText = g_i18n:getText( "action_startFerry" )

return self
end

run

Description

Definition

run()

Code

function FerryActivatable:run()
self.ferry:start()
end