Skip to main content
Skip to main content

VehicleSetIsReconfiguratingEvent

VehicleSetIsReconfiguratingEvent

Description

Event for set isRegonfigurating on vehicles

Parent

Event

Functions

emptyNew

Description

Create instance of Event class

Definition

emptyNew()

Return Values

anyselfinstance of class event

Code

function VehicleSetIsReconfiguratingEvent.emptyNew()
local self = Event.new( VehicleSetIsReconfiguratingEvent _mt)
return self
end

new

Description

Create new instance of event

Definition

new(table object, integer state)

Arguments

tableobjectobject
integerstatestate

Code

function VehicleSetIsReconfiguratingEvent.new(object)
local self = VehicleSetIsReconfiguratingEvent.emptyNew()
self.object = object
return self
end

readStream

Description

Called on client side on join

Definition

readStream(integer streamId, Connection connection)

Arguments

integerstreamIdstreamId
Connectionconnectionconnection

Code

function VehicleSetIsReconfiguratingEvent:readStream(streamId, connection)
self.object = NetworkUtil.readNodeObject(streamId)
if self.object ~ = nil and self.object:getIsSynchronized() then
self.object.isReconfigurating = true
end
end

writeStream

Description

Called on server side on join

Definition

writeStream(integer streamId, Connection connection)

Arguments

integerstreamIdstreamId
Connectionconnectionconnection

Code

function VehicleSetIsReconfiguratingEvent:writeStream(streamId, connection)
NetworkUtil.writeNodeObject(streamId, self.object)
end