// Use this for initialization void Start() { em = GetComponent <EditMap> (); controller = gameObject.GetComponent <CharacterController> (); m_CharacterTargetRot = transform.localRotation; m_CameraTargetRot = came.transform.localRotation; }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditMap_Tap(object sender, System.Windows.Input.GestureEventArgs e) { Point p = e.GetPosition(this.EditMap); GeoCoordinate geo = new GeoCoordinate(); geo = EditMap.ViewportPointToLocation(p); Pushpin.Location = geo; LatTxt.Text = Pushpin.Location.Latitude.ToString(); LonTxt.Text = Pushpin.Location.Longitude.ToString(); EditMap.Center = Pushpin.Location; EditMap.ZoomLevel = 15; }
private EditString(string originalText, string currentText, EditMap map) { this.OriginalText = originalText ?? ""; this.CurrentText = currentText ?? ""; _map = map; }
public void DeleteMarker(EditMap.EditingMarkers.WorkingElement Element){ switch (Element.ListId) { case 0: ArmiesTrash.Add(Element.InstanceId); break; case 1: MexesTrash.Add(Element.InstanceId); break; case 2: HydrosTrash.Add(Element.InstanceId); break; case 3: AiTrash.Add(Element.InstanceId); break; } }
public GameObject GetMarkerRenderer(EditMap.EditingMarkers.WorkingElement Element){ switch(Element.ListId){ case 0: return MarkerRend.Armys[Element.InstanceId]; case 1: return MarkerRend.Mex[Element.InstanceId]; case 2: return MarkerRend.Hydro[Element.InstanceId]; case 3: return MarkerRend.Ai[Element.InstanceId]; } return null; }
public void SetPosOfMarker(EditMap.EditingMarkers.WorkingElement Element, Vector3 NewPos){ switch(Element.ListId){ case 0: ARMY_[Element.InstanceId].position = NewPos; break; case 1: Mexes[Element.InstanceId].position = NewPos; break; case 2: Hydros[Element.InstanceId].position = NewPos; break; case 3: SiMarkers[Element.InstanceId].position = NewPos; break; } }
public Vector3 GetPosOfMarker(EditMap.EditingMarkers.WorkingElement Element){ switch(Element.ListId){ case 0: return MarkerRend.Armys[Element.InstanceId].transform.position; case 1: return MarkerRend.Mex[Element.InstanceId].transform.position; case 2: return MarkerRend.Hydro[Element.InstanceId].transform.position; case 3: return MarkerRend.Ai[Element.InstanceId].transform.position; } return Vector3.zero; }
private void btMap_Click(object sender, EventArgs e) { var f = new EditMap(); formMain.subeditorOpen(f, (ToolStripButton)sender); }