ImpactSoundEvent = {};
ImpactSoundEvent_mt = Class(ImpactSoundEvent, Event);
InitEventClass(ImpactSoundEvent, "ImpactSoundEvent");

function ImpactSoundEvent:emptyNew()
    local self = Event:new(ImpactSoundEvent_mt);
    self.className="ImpactSoundEvent";
    return self;
end;

function ImpactSoundEvent:new(object)
    local self = ImpactSoundEvent:emptyNew(); 
	self.object = object; 
    return self;
end;

function ImpactSoundEvent:writeStream(streamId, connection)
    streamWriteInt32(streamId, networkGetObjectId(self.object));
end;

function ImpactSoundEvent:readStream(streamId, connection)
    self.object = networkGetObject(streamReadInt32(streamId));
    self:run(connection);
end;

function ImpactSoundEvent:run(connection)
	self.object:startImpactSound();	
end;