Sprache Deutsch Language English

Script Dokumentation LS 2015 - AITractorRotateRightEvent (Patch 1.3)

Script Dokumentation Übersicht

scripts/vehicles/specializations/AITractorRotateRightEvent.lua

Copyright (c) 2008-2015 GIANTS Software GmbH, Confidential, All Rights Reserved.
This document is to be published solely by ls-mods.de
1-- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved.
2
3AITractorRotateRightEvent = {};
4AITractorRotateRightEvent_mt = Class(AITractorRotateRightEvent, Event);
5
6InitStaticEventClass(AITractorRotateRightEvent, "AITractorRotateRightEvent", EventIds.EVENT_AITRACTOR_ROTATE_RIGHT);
7
8function AITractorRotateRightEvent:emptyNew()
9 local self = Event:new(AITractorRotateRightEvent_mt);
10 return self;
11end;
12
13function AITractorRotateRightEvent:new(object)
14 local self = AITractorRotateRightEvent:emptyNew()
15 self.object = object;
16 return self;
17end;
18
19function AITractorRotateRightEvent:readStream(streamId, connection)
20 local id = streamReadInt32(streamId);
21 self.object = networkGetObject(id);
22 self:run(connection);
23end;
24
25function AITractorRotateRightEvent:writeStream(streamId, connection)
26 streamWriteInt32(streamId, networkGetObjectId(self.object));
27end;
28
29function AITractorRotateRightEvent:run(connection)
30 AITractor.aiRotateRight(self.object);
31end;
Copyright (c) 2008-2015 GIANTS Software GmbH, Confidential, All Rights Reserved.
This document is to be published solely by ls-mods.de
Script Dokumentation Übersicht