Example #1
0
 /// <summary>
 /// This methods will be invoked every time when the user clicks with the mouse into the KGFMapSysetm
 /// </summary>
 /// <param name="theSender"></param>
 /// <param name="theEventArgs"></param>
 void OnUserClickedOnMap(object theSender, EventArgs theEventArgs)
 {
     KGFMapSystem.KGFClickEventArgs anEventArgs = theEventArgs as KGFMapSystem.KGFClickEventArgs;
     if (anEventArgs != null)
     {
         Debug.Log("Clicked at position(world space): " + anEventArgs.itsPosition);
     }
 }
Example #2
0
    //鼠标点击小地图
    void OnClickedOnMinimap(object theSender, EventArgs theArgs)
    {
        Transform flag = GameObject.Find("flags").transform;

        if (flag != null && flag.transform.childCount > 0)
        {
            Destroy(flag.transform.GetChild(0).gameObject);
        }

        KGFMapSystem.KGFClickEventArgs aClickArgs = (KGFMapSystem.KGFClickEventArgs)theArgs;
        canMove       = true;
        clickPosition = aClickArgs.itsPosition;
    }