local this = class("entityHandle")

function this:ctor()
  self.csHandle = nil
end

function this:initialize(csEntity)
  self.csHandler = csEntity.handler
end

function this:addEnterStateHandler(handle)
  self.csHandler:AddEnterStateHandler(handle)
end

function this:removeEnterStateHandler(handle)
  self.csHandler:RemoveEnterStateHandler(handle)
end

function this:addExitStateHandler(handle)
  self.csHandler:AddExitStateHandler(handle)
end

function this:removeExitStateHandler(handle)
  self.csHandler:RemoveExitStateHandler(handle)
end

function this:addFsmChangedHandler(listener)
  self.csHandler.onFsmStateChange:Add(listener)
end

function this:removeFsmChangedHandler(listener)
  self.csHandler.onFsmStateChange:Remove(listener)
end

function this:addControlMoveChangedHandle(handler)
end

function this:removeControlMoveChangedHandle(handler)
end

function this:addCustomEventHandler(eventId, handler)
  self.csHandler.customEventHandler:AddListener(eventId, handler)
end

function this:addCustomEventHandlerIntParam(eventId, handler)
  self.csHandler:AddCustomListenerWithIntParam(eventId, handler)
end

function this:removeCustomEventHandler(eventId, handler)
  self.csHandler.customEventHandler:RemoveListener(eventId, handler)
end

function this:addEventC2LHandler(callback)
  self.csHandler.c2lEventHandler:Add(callback)
end

function this:removeEventC2LHandler(callback)
  self.csHandler.c2lEventHandler:Remove(callback)
end

function this:addBoardCastEventHandler(callBack)
  self.csHandler.boardCastEventHandler:Add(callBack)
end

function this:removeBoardCastEventHandler(callBack)
  self.csHandler.boardCastEventHandler:Remove(callBack)
end

return this
