Beispiel #1
0
 private void OnUnitClicked(object sender, EventArgs e)
 {
     if (!EventSystem.current.IsPointerOverGameObject())
     {
         RoundState.OnUnitClicked(sender as Unit);
     }
 }
Beispiel #2
0
    private void OnUnitClicked(object sender, EventArgs e)
    {
        //PC端判断如下


        //移动端判断如下
        if (!(Input.touchCount > 0 && EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId)) && !EventSystem.current.IsPointerOverGameObject())
        {
            RoundState.OnUnitClicked(sender as Unit);
        }
    }
Beispiel #3
0
 private void OnUnitClicked(object sender, EventArgs e)
 {
     RoundState.OnUnitClicked(sender as Unit);
 }