Merge remote-tracking branch 'origin/dev_mobile_ble' into dev_mobile
This commit is contained in:
commit
750d9107b4
4 files changed
+3024
-23
No files matched your search
@@ -39,7 +39,11 @@ public class BigMapController : PFUIPanel
|
||||
{
|
||||
if (_tips == null)
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
_tips = ((GameObject)Instantiate(tipsObject, canvas.transform.Find("TipsContainer"))).GetComponent<MapItem>();
|
||||
#else
|
||||
_tips = canvas.transform.Find("TipsContainer/MapItem-Mobile").GetComponent<MapItem>();
|
||||
#endif
|
||||
}
|
||||
return _tips;
|
||||
}
|
||||
@@ -85,7 +89,6 @@ public class BigMapController : PFUIPanel
|
||||
canvas = this.transform.Find("Canvas").gameObject;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
mainContainer = canvas.transform.Find("MainContainer").gameObject;
|
||||
|
||||
#else
|
||||
mainContainer = canvas;
|
||||
#endif
|
||||
@@ -334,7 +337,9 @@ public class BigMapController : PFUIPanel
|
||||
if(item.Value.Selected)
|
||||
{
|
||||
tips.Hide();
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
tips = null;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -402,20 +407,23 @@ public class BigMapController : PFUIPanel
|
||||
if(_tips != null)
|
||||
{
|
||||
_tips.Hide();
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
_tips = null;
|
||||
#endif
|
||||
}
|
||||
if (line.Selected)
|
||||
{
|
||||
line.Selected = false;
|
||||
//tips.Hide();
|
||||
//tips = null;
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
tips = null;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
line.Selected = true;
|
||||
//iii.Selected(true);
|
||||
var position = line.BeginMarker.transform.position;
|
||||
//position.z += 25;
|
||||
position = DefaultPosition();
|
||||
tips.Show(position, line.Model);
|
||||
|
||||
foreach (var item in linesCache)
|
||||
@@ -450,7 +458,7 @@ public class BigMapController : PFUIPanel
|
||||
|
||||
var position = line.BeginMarker.transform.position;
|
||||
//position.z += 25;
|
||||
position = DefaultPosition();
|
||||
|
||||
tips.Show(position, line.Model);
|
||||
|
||||
foreach (var item in linesCache)
|
||||
@@ -478,7 +486,6 @@ public class BigMapController : PFUIPanel
|
||||
var position = line.BeginMarker.transform.position;
|
||||
//position.z += 25;
|
||||
//tips.Show(position, line.Model);
|
||||
position = DefaultPosition();
|
||||
tips.Move(position);
|
||||
}
|
||||
}
|
||||
@@ -501,16 +508,6 @@ public class BigMapController : PFUIPanel
|
||||
|
||||
}
|
||||
|
||||
|
||||
Vector3 DefaultPosition()
|
||||
{
|
||||
Vector3 vector3 = new Vector3(0.8f, 0.35f, 180f);
|
||||
////Debug.Log(vp);
|
||||
//var wd = Camera.main.WorldToScreenPoint(worldPosition);
|
||||
var wd = Camera.main.ViewportToWorldPoint(vector3);
|
||||
return wd;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
@@ -530,8 +527,6 @@ public class BigMapController : PFUIPanel
|
||||
if (_tips != null)
|
||||
{
|
||||
_tips.Hide();
|
||||
_tips = null;
|
||||
canvas.transform.Find("TipsContainer").gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user