|
@@ -16,7 +16,7 @@ namespace GFGGame
|
|
private int guideIndex;
|
|
private int guideIndex;
|
|
private bool justHint;//仅提示,不提示点击,无遮罩,点击任何地方可关闭引导
|
|
private bool justHint;//仅提示,不提示点击,无遮罩,点击任何地方可关闭引导
|
|
private float compTxtY = 0;//提示语位置
|
|
private float compTxtY = 0;//提示语位置
|
|
-
|
|
|
|
|
|
+ private string txtContent = "";
|
|
private GameObject _gameObject;
|
|
private GameObject _gameObject;
|
|
private GoWrapper _wrapper;
|
|
private GoWrapper _wrapper;
|
|
|
|
|
|
@@ -62,7 +62,7 @@ namespace GFGGame
|
|
|
|
|
|
List<object> dataList = viewData as List<object>;
|
|
List<object> dataList = viewData as List<object>;
|
|
guideTarget = dataList[0] as GObject;
|
|
guideTarget = dataList[0] as GObject;
|
|
- string txtContent = (string)dataList[1];
|
|
|
|
|
|
+ txtContent = (string)dataList[1];
|
|
|
|
|
|
guideId = (int)dataList[2];
|
|
guideId = (int)dataList[2];
|
|
guideIndex = (int)dataList[3];
|
|
guideIndex = (int)dataList[3];
|
|
@@ -73,15 +73,15 @@ namespace GFGGame
|
|
MainDataManager.Instance.CanSwipe = false;
|
|
MainDataManager.Instance.CanSwipe = false;
|
|
|
|
|
|
UpdateComTxt(txtContent);
|
|
UpdateComTxt(txtContent);
|
|
- _ui.m_comHolder.target.visible = false;
|
|
|
|
|
|
+
|
|
_ui.m_mask.target.visible = false;
|
|
_ui.m_mask.target.visible = false;
|
|
_ui.m_loaMask.visible = false;
|
|
_ui.m_loaMask.visible = false;
|
|
if (guideTarget != null)
|
|
if (guideTarget != null)
|
|
{
|
|
{
|
|
|
|
|
|
Timers.inst.AddUpdate(UpdateGuideRect);
|
|
Timers.inst.AddUpdate(UpdateGuideRect);
|
|
- _ui.m_comHolder.target.visible = true;
|
|
|
|
_ui.m_mask.target.visible = true;
|
|
_ui.m_mask.target.visible = true;
|
|
|
|
+
|
|
guideTarget.onClick.Add(OnClickTarget);
|
|
guideTarget.onClick.Add(OnClickTarget);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -91,6 +91,9 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_ui.m_compTxt.target.y = compTxtY;
|
|
_ui.m_compTxt.target.y = compTxtY;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ _ui.m_compTxt.target.visible = !String.IsNullOrEmpty(txtContent);
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -99,6 +102,10 @@ namespace GFGGame
|
|
{
|
|
{
|
|
|
|
|
|
base.OnHide();
|
|
base.OnHide();
|
|
|
|
+ _ui.m_comHolder.target.visible = false;
|
|
|
|
+ _ui.m_compTxt.target.visible = false;
|
|
|
|
+
|
|
|
|
+ // guideTarget.onClick.Remove(OnClickTarget);
|
|
guideTarget = null;
|
|
guideTarget = null;
|
|
Timers.inst.Remove(UpdateGuideRect);
|
|
Timers.inst.Remove(UpdateGuideRect);
|
|
}
|
|
}
|
|
@@ -120,7 +127,6 @@ namespace GFGGame
|
|
{
|
|
{
|
|
this._ui.m_compTxt.m_txt.align = AlignType.Center;
|
|
this._ui.m_compTxt.m_txt.align = AlignType.Center;
|
|
}
|
|
}
|
|
- _ui.m_compTxt.target.visible = true;
|
|
|
|
|
|
|
|
this._ui.m_compTxt.m_txtBg.height = this._ui.m_compTxt.m_txtBg.initHeight;
|
|
this._ui.m_compTxt.m_txtBg.height = this._ui.m_compTxt.m_txtBg.initHeight;
|
|
if (this._ui.m_compTxt.m_txt.textHeight > this._ui.m_compTxt.m_txt.textFormat.size * 3)
|
|
if (this._ui.m_compTxt.m_txt.textHeight > this._ui.m_compTxt.m_txt.textFormat.size * 3)
|
|
@@ -140,33 +146,37 @@ namespace GFGGame
|
|
if (_ui.m_mask.m_guideArea.xy == pos)
|
|
if (_ui.m_mask.m_guideArea.xy == pos)
|
|
{
|
|
{
|
|
Timers.inst.Remove(UpdateGuideRect);
|
|
Timers.inst.Remove(UpdateGuideRect);
|
|
|
|
+ _ui.m_comHolder.target.position = _ui.m_mask.m_guideArea.position;
|
|
|
|
+
|
|
|
|
+ if (pos.x > GRoot.inst.width / 2)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_comHolder.m_c1.selectedIndex = 0;//手在左边
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _ui.m_comHolder.m_c1.selectedIndex = 1;//手在右边
|
|
|
|
+ }
|
|
|
|
+ _ui.m_comHolder.target.visible = true;
|
|
|
|
+ _ui.m_compTxt.target.visible = !String.IsNullOrEmpty(txtContent);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ int padding = 200;
|
|
|
|
+ if (pos.y < GRoot.inst.height - 700)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_compTxt.target.y = pos.y + padding;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _ui.m_compTxt.target.y = pos.y - padding - _ui.m_compTxt.target.height;
|
|
|
|
+ }
|
|
|
|
+ if (compTxtY > 0)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_compTxt.target.y = compTxtY;
|
|
|
|
+ }
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
_ui.m_mask.m_guideArea.SetXY(pos.x, pos.y);
|
|
_ui.m_mask.m_guideArea.SetXY(pos.x, pos.y);
|
|
- _ui.m_comHolder.target.position = _ui.m_mask.m_guideArea.position;
|
|
|
|
|
|
|
|
- if (pos.x > GRoot.inst.width / 2)
|
|
|
|
- {
|
|
|
|
- _ui.m_comHolder.m_c1.selectedIndex = 0;//手在左边
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _ui.m_comHolder.m_c1.selectedIndex = 1;//手在右边
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- int padding = 200;
|
|
|
|
- if (pos.y < GRoot.inst.height - 700)
|
|
|
|
- {
|
|
|
|
- _ui.m_compTxt.target.y = pos.y + padding;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _ui.m_compTxt.target.y = pos.y - padding - _ui.m_compTxt.target.height;
|
|
|
|
- }
|
|
|
|
- if (compTxtY > 0)
|
|
|
|
- {
|
|
|
|
- _ui.m_compTxt.target.y = compTxtY;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|