Beispiel #1
0
    public void TgtMarkerClickedL(MapTgtMarker own)
    {
        IMarkerParentObject sc_obj = own.LinkedObject;

        if (selection.Contains(sc_obj))
        {
            selection_viewer.Remove(sc_obj);
        }
        else
        {
            selection_viewer.Add(sc_obj);
        }
    }
 public void OnPointerClick(PointerEventData data)
 {
     if (data.button == PointerEventData.InputButton.Left)
     {
         parent.Remove(referred);
         SceneGlobals.ui_script.HighlightingPosition = new Vector3(-200, -200);
     }
     else if (data.button == PointerEventData.InputButton.Right)
     {
         if (selector == null)
         {
             selector = MapCore.Active.AddSelectorForSceneObject(referred, (Vector2)transform.position + offset, (Vector2)transform.position + new Vector2(parent.button_dimensions.x / 2, 0),
                                                                 referred.Friendly ? MapCore.friendly_color_selected : MapCore.ennemy_color_selected);
         }
     }
 }