加确认框。按钮加tooltips。调整大地图tips的位置。
This commit is contained in:
1 parent
bb4fabc833
commit
1c712ff7d5
18 files changed
+2401
-520
No files matched your search
@@ -42,7 +42,7 @@ public class Tips : MonoBehaviour
|
||||
this.GetComponent<Image>().material = material;
|
||||
|
||||
Name = this.transform.Find("Name").GetComponent<Text>();
|
||||
Count = this.transform.Find("Count").GetComponent<Text>();
|
||||
Count = this.transform.Find("CountWrap").Find("Count").GetComponent<Text>();
|
||||
Distance = this.transform.Find("Distance").GetComponent<Text>();
|
||||
TotalClimb = this.transform.Find("TotalClimb").GetComponent<Text>();
|
||||
|
||||
@@ -115,7 +115,6 @@ public class Tips : MonoBehaviour
|
||||
|
||||
m3DIcon.SetActive(_model.Enable3D);
|
||||
|
||||
|
||||
//altitudeGraph
|
||||
|
||||
Utils.DisplayImage(StartCoroutine, altitudeGraph, _model.AltitudeGraph);
|
||||
@@ -129,31 +128,52 @@ public class Tips : MonoBehaviour
|
||||
//{
|
||||
// position.y = position.z;
|
||||
//}
|
||||
this.transform.position = position;
|
||||
|
||||
var localPosition = this.transform.localPosition;
|
||||
if (localPosition.y + 150 > localPosition.z)
|
||||
{
|
||||
localPosition.y = localPosition.z -150;
|
||||
}
|
||||
if(localPosition.x * -1f > localPosition.z)
|
||||
{
|
||||
localPosition.x = localPosition.z * -1f;
|
||||
}
|
||||
else if(localPosition.x > localPosition.z *2)
|
||||
{
|
||||
localPosition.x = localPosition.z * 2;
|
||||
}
|
||||
this.transform.localPosition = localPosition;
|
||||
this.transform.localScale = new Vector2(2, 2);
|
||||
this.Move(position);
|
||||
|
||||
//tips.Show();
|
||||
this.gameObject.SetActive(true);
|
||||
|
||||
this.SetModel(model);
|
||||
}
|
||||
|
||||
public void Move(Vector3 position)
|
||||
{
|
||||
this.transform.position = position;
|
||||
|
||||
var localPosition = this.transform.localPosition;
|
||||
Debug.Log(localPosition.y);
|
||||
if(localPosition.y > 128)
|
||||
{
|
||||
localPosition.y = 128;
|
||||
}
|
||||
if(localPosition.x < -465)
|
||||
{
|
||||
localPosition.x = -465f;
|
||||
}
|
||||
if(localPosition.x > 1080)
|
||||
{
|
||||
localPosition.x = 1080;
|
||||
}
|
||||
//if (localPosition.y + 150 > localPosition.z)
|
||||
//{
|
||||
// localPosition.y = localPosition.z -150;
|
||||
//}
|
||||
//if(localPosition.x * -1f > localPosition.z)
|
||||
//{
|
||||
// localPosition.x = localPosition.z * -1f;
|
||||
//}
|
||||
//else if(localPosition.x > localPosition.z *2)
|
||||
//{
|
||||
// localPosition.x = localPosition.z * 2;
|
||||
//}
|
||||
this.transform.localPosition = localPosition;
|
||||
this.transform.localScale = new Vector2(2, 2);
|
||||
|
||||
Debug.Log($"{ this.transform.localPosition.y }, { this.transform.localPosition.y }");
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
//this.gameObject.SetActive(false);
|
||||
DestroyImmediate(this.gameObject);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user