local Test = {}

local function OnClickBUttonTest()
    print("---->OnClickBUttonTest")
end

local function GetHitInfoMovePlayer()
    local Input = CS.UnityEngine.Input
    if Input.GetMouseButtonDown(0) then
        local mousePosition = CS.UnityEngine.Input.mousePosition
        local bTouchUI = require("Base/UIHelper.lua"):IsPointerOverGameObject(mousePosition)
        print("----> bTouchUI")
    end
end

local function RegisterTouchEvent()
    local uiHelper = require("Base/UIHelper.lua")

    uiHelper:AddClickEvent(Test._rootCanvas, "Button", OnClickBUttonTest)
end

function Test.Awake()
    local canvas = CS.UnityEngine.GameObject.Find("Canvas").gameObject
    Test._rootCanvas = canvas
end

function Test.Start()
    RegisterTouchEvent()
end

function Test.Update()
    GetHitInfoMovePlayer()
end

return Test