private void OnclickPlay() { List <OnlineMapsVector2d> route = new List <OnlineMapsVector2d>(); // ArrayList markerRouteList = new ArrayList(); string gpsID = input_id.text; string time_start = input_start_time.text; string time_end = input_end_time.text; string sql = $"select * from gpsinfo where gpsid = {gpsID} and t<'{time_end}' and t>'{time_start}' order by t asc"; MySqlDataReader dr = SqlHelper.Insatance.DoGetReader(sql); if (dr != null) { while (dr.Read()) { Vector2 v = new Vector2(Convert.ToSingle(dr["lng"].ToString()), Convert.ToSingle(dr["lat"].ToString())); route.Add(v); } } dr.Close(); Debug.Log("路径节点数量:" + route.Count); if (route.Count > 1) { PlayBack pb = gameObject.GetComponent <PlayBack>(); pb.CreatOneRoute(new PlayBackExecutor(route, gpsID + " 轨迹")); OnClickCanel(); } else { GameObject.Find("Text_Message").GetComponent <Text>().text = "坐标太少(小于2),无法生成路径"; } }
private void Replay_Click(object sender, EventArgs e) { var playBackWindow = new PlayBack(); playBackWindow.Closed += (o, args) => this.Show(); playBackWindow.Show(); this.Hide(); }
private void OnClickClear() { PlayBack pb = gameObject.GetComponent <PlayBack>(); if (pb != null) { pb.Clear(); // Destroy(pb); } }
/// <summary> /// Main function for finding the position of the mover /// </summary> /// <param name="seg">Segment is the current node we last passed use to figure out the next ones</param> /// <param name="ratio">How far along are we to the next node based on a 0-1 scale</param> /// <param name="play">How we move along the rail</param> /// <returns>Vector3 position between current node and the next node</returns> public Vector3 Position(int seg, float ratio, PlayBack play, bool isCompleted) { switch (play) { default: case PlayBack.Linear: return(Linear(seg, ratio)); case PlayBack.Catmull: return(Catmull(seg, ratio, isCompleted)); } }
public override string ToString() { g = (PlayBack)base.Tag; Binding myBinding = new Binding("filename"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = g; cmbfilename.SetBinding(ComboBox.TextProperty, myBinding); Binding myBinding2 = new Binding("options"); myBinding2.Mode = BindingMode.TwoWay; myBinding2.Source = g; txtopt.SetBinding(TextBox.TextProperty, myBinding2); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = g; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return base.ToString(); }
public override string ToString() { g = (PlayBack)base.Tag; Binding myBinding = new Binding("filename"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = g; cmbfilename.SetBinding(ComboBox.TextProperty, myBinding); Binding myBinding2 = new Binding("options"); myBinding2.Mode = BindingMode.TwoWay; myBinding2.Source = g; txtopt.SetBinding(TextBox.TextProperty, myBinding2); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = g; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return(base.ToString()); }
void Awake() { _playBack = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <PlayBack> (); _saveLoadData = GameObject.FindGameObjectWithTag(Tags.SaveLoadObject).GetComponent <SaveLoadDataSerialized>(); }
void Awake() { _playBack = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <PlayBack> (); }