|
@@ -86,6 +86,7 @@ namespace GFGGame
|
|
|
|
|
|
private List<GameObject> _gameObjects = new List<GameObject>();
|
|
|
private List<GoWrapper> _wrappers = new List<GoWrapper>();
|
|
|
+ private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
|
// private GoWrapper _wrapper5;
|
|
|
// private Dictionary<int, RoleSkillCfg> _npcSkillDic;
|
|
|
|
|
@@ -121,8 +122,14 @@ namespace GFGGame
|
|
|
for (int i = 0; i < _gameObjects.Count; i++)
|
|
|
{
|
|
|
SceneController.DestroyObjectFromView(_gameObjects[i], _wrappers[i]);
|
|
|
+ }
|
|
|
|
|
|
+ for (int i = 0; i < _listLongPress.Count; i++)
|
|
|
+ {
|
|
|
+ _listLongPress[i].Dispose();
|
|
|
}
|
|
|
+ _listLongPress.Clear();
|
|
|
+
|
|
|
if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
@@ -199,6 +206,11 @@ namespace GFGGame
|
|
|
btnSkill.data = roleSkillCfgs[i];
|
|
|
GLoader icon = btnSkill.GetChild("icon").asLoader;
|
|
|
icon.onClick.Add(() => { OnBtnSkillClick(btnSkill); });
|
|
|
+ LongPressGesture longPressGesture = new LongPressGesture(btnSkill);
|
|
|
+ longPressGesture.once = true;
|
|
|
+ longPressGesture.onAction.Add(OnLongPress);
|
|
|
+ longPressGesture.onEnd.Add(OnLongEnd);
|
|
|
+ _listLongPress.Add(longPressGesture);
|
|
|
}
|
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
|
|
|
@@ -213,7 +225,7 @@ namespace GFGGame
|
|
|
});
|
|
|
_ui.m_comMineCircle.target.onClick.Add(() =>
|
|
|
{
|
|
|
- _ui.m_btnSkill0.target.touchable = true;
|
|
|
+ _ui.m_btnSkill0.m_icon.touchable = true;
|
|
|
});
|
|
|
|
|
|
_ui.m_btnSkill0.target.onClick.Add(() =>
|
|
@@ -285,7 +297,7 @@ namespace GFGGame
|
|
|
{
|
|
|
_speed = 1;
|
|
|
EquipDataCache.cacher.autoPlay = false;
|
|
|
- _ui.m_btnSkill0.target.touchable = false;
|
|
|
+ _ui.m_btnSkill0.m_icon.touchable = false;
|
|
|
}
|
|
|
|
|
|
if (_levelCfg.type == ConstInstanceZonesType.Field || EquipDataCache.cacher.autoPlay)
|
|
@@ -299,14 +311,15 @@ namespace GFGGame
|
|
|
GComponent btnSkill = _ui.target.GetChild("btnSkill" + i).asCom;
|
|
|
UI_ComBtnSkill item = UI_ComBtnSkill.Proxy(btnSkill);
|
|
|
item.m_txtCount.text = roleSkillCfgs[i].limiteCount.ToString();
|
|
|
- UI_ComBtnSkill.ProxyEnd();
|
|
|
- btnSkill.touchable = true;
|
|
|
+ item.m_icon.touchable = true;
|
|
|
if (_isAutoPlay)
|
|
|
{
|
|
|
|
|
|
- btnSkill.touchable = !_isAutoPlay;
|
|
|
+ item.m_icon.touchable = !_isAutoPlay;
|
|
|
OnBtnSkillClick(btnSkill);
|
|
|
}
|
|
|
+ UI_ComBtnSkill.ProxyEnd();
|
|
|
+
|
|
|
}
|
|
|
_ui.m_btnSpeedUp.visible = _isAutoPlay;
|
|
|
_ui.m_btnSpeedUp.title = "x" + _speed;
|
|
@@ -650,6 +663,29 @@ namespace GFGGame
|
|
|
_ui.m_btnSpeedUp.title = "x" + _speed;
|
|
|
}
|
|
|
|
|
|
+ private void OnLongPress(EventContext context)
|
|
|
+ {
|
|
|
+ LongPressGesture gesture = (LongPressGesture)context.sender;
|
|
|
+ RoleSkillCfg skillCfg = gesture.host.data as RoleSkillCfg;
|
|
|
+ _ui.m_comSkillTips.target.visible = true;
|
|
|
+ if (skillCfg.skillId <= 2)
|
|
|
+ {
|
|
|
+ _ui.m_comSkillTips.m_c1.selectedIndex = 0;
|
|
|
+ _ui.m_comSkillTips.target.x = gesture.host.x + 90;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_comSkillTips.m_c1.selectedIndex = 1;
|
|
|
+ _ui.m_comSkillTips.target.x = gesture.host.x - 240;
|
|
|
+ }
|
|
|
+ _ui.m_comSkillTips.m_txtTitle.text = skillCfg.name;
|
|
|
+ _ui.m_comSkillTips.m_txtContent.text = skillCfg.desc;
|
|
|
+ }
|
|
|
+ private void OnLongEnd()
|
|
|
+ {
|
|
|
+ _ui.m_comSkillTips.target.visible = false;
|
|
|
+ }
|
|
|
+
|
|
|
private void OnBtnBackClick()
|
|
|
{
|
|
|
Reset();
|
|
@@ -685,6 +721,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void Reset()
|
|
|
{
|
|
|
+ _ui.m_comSkillTips.target.visible = false;
|
|
|
|
|
|
_ui.m_proScore.target.max = 100;
|
|
|
_ui.m_proScore.target.value = 0;
|
|
@@ -726,7 +763,6 @@ namespace GFGGame
|
|
|
|
|
|
btnSkill.GetChild("icon").asLoader.data = 0;
|
|
|
btnSkill.GetController("c1").selectedIndex = 0;
|
|
|
- // btnSkill.GetTransition("t0").Stop();
|
|
|
}
|
|
|
_isAutoPlay = false;
|
|
|
Timers.inst.Remove(CircleScoreStart);
|