|
@@ -1,6 +1,7 @@
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using Core.Audio;
|
|
using Core.Audio;
|
|
|
|
+using Core.UI.UTool;
|
|
using Excel2Json;
|
|
using Excel2Json;
|
|
using Fort23.Core;
|
|
using Fort23.Core;
|
|
using Fort23.UTool;
|
|
using Fort23.UTool;
|
|
@@ -68,7 +69,7 @@ namespace Fort23.Mono
|
|
|
|
|
|
if (PlayerManager.Instance.BagController.DeductItem(elixirItemWidget.ItemConfig.ID, 1))
|
|
if (PlayerManager.Instance.BagController.DeductItem(elixirItemWidget.ItemConfig.ID, 1))
|
|
{
|
|
{
|
|
- PlayerManager.Instance.myHero.heroData.exp += elixirItemWidget.ItemConfig.associateVlaue[0];
|
|
|
|
|
|
+ // PlayerManager.Instance.myHero.heroData.exp += elixirItemWidget.ItemConfig.associateVlaue[0];
|
|
AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount++;
|
|
AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount++;
|
|
AccountFileInfo.Instance.SavePlayerData();
|
|
AccountFileInfo.Instance.SavePlayerData();
|
|
AudioManager.Instance.PlayAudio("ui_shiyonghuode");
|
|
AudioManager.Instance.PlayAudio("ui_shiyonghuode");
|
|
@@ -83,24 +84,17 @@ namespace Fort23.Mono
|
|
elixirItemWidget.fx_ui_danyao_qi.Play();
|
|
elixirItemWidget.fx_ui_danyao_qi.Play();
|
|
|
|
|
|
|
|
|
|
- // CustomTweenManager.To()
|
|
|
|
HeroInformationPanel heroInformationPanel = UIManager.Instance.GetComponent<HeroInformationPanel>();
|
|
HeroInformationPanel heroInformationPanel = UIManager.Instance.GetComponent<HeroInformationPanel>();
|
|
- // ImageMoveContainer imageMoveContainer = new ImageMoveContainer();
|
|
|
|
|
|
+ // heroInformationPanel.UseExpElixir()
|
|
GameObjectPool gameObjectPool = null;
|
|
GameObjectPool gameObjectPool = null;
|
|
gameObjectPool = await GObjectPool.Instance.FetchAsync<GameObjectPool>("fx_ui_danyao_tw");
|
|
gameObjectPool = await GObjectPool.Instance.FetchAsync<GameObjectPool>("fx_ui_danyao_tw");
|
|
gameObjectPool.own.transform.SetParent(this.transform);
|
|
gameObjectPool.own.transform.SetParent(this.transform);
|
|
- // gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = transform.worldToLocalMatrix *
|
|
|
|
- // elixirItemWidget.fx_ui_danyao_qi.transform.position;
|
|
|
|
|
|
+
|
|
|
|
|
|
Vector2 pos = transform.worldToLocalMatrix * elixirItemWidget.fx_ui_danyao_qi.transform.position;
|
|
Vector2 pos = transform.worldToLocalMatrix * elixirItemWidget.fx_ui_danyao_qi.transform.position;
|
|
Vector2 pos1 = transform.worldToLocalMatrix *
|
|
Vector2 pos1 = transform.worldToLocalMatrix *
|
|
heroInformationPanel.fxroot.GetComponent<RectTransform>().position;
|
|
heroInformationPanel.fxroot.GetComponent<RectTransform>().position;
|
|
gameObjectPool.own.GetComponent<RectTransform>().anchoredPosition = pos;
|
|
gameObjectPool.own.GetComponent<RectTransform>().anchoredPosition = pos;
|
|
- // imageMoveContainer.AddACurve(pos, pos1, 0, 1.5f, gameObjectPool, (i) =>
|
|
|
|
- // {
|
|
|
|
- // heroInformationPanel.fx_ui_danyao_shi.gameObject.SetActive(true);
|
|
|
|
- // heroInformationPanel.fx_ui_danyao_shi.Play();
|
|
|
|
- // });
|
|
|
|
CustomTweenManager
|
|
CustomTweenManager
|
|
.To(() => pos, x => gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = x,
|
|
.To(() => pos, x => gameObjectPool.own.transform.GetComponent<RectTransform>().anchoredPosition = x,
|
|
pos1, 0.5f, gameObjectPool.own)
|
|
pos1, 0.5f, gameObjectPool.own)
|
|
@@ -110,6 +104,22 @@ namespace Fort23.Mono
|
|
heroInformationPanel.fx_ui_danyao_shi.gameObject.SetActive(true);
|
|
heroInformationPanel.fx_ui_danyao_shi.gameObject.SetActive(true);
|
|
heroInformationPanel.fx_ui_danyao_shi.Play();
|
|
heroInformationPanel.fx_ui_danyao_shi.Play();
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+ int exp = 0;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ AccumulatorUtility.StartAccumulation(
|
|
|
|
+ elixirItemWidget.ItemConfig.associateVlaue[0], 0.2f, 20,
|
|
|
|
+ current =>
|
|
|
|
+ {
|
|
|
|
+ PlayerManager.Instance.myHero.heroData.exp += current;
|
|
|
|
+ AccountFileInfo.Instance.SavePlayerData();
|
|
|
|
+ LogTool.Error("z" + current);
|
|
|
|
+ },
|
|
|
|
+ () => Debug.Log("累加完成!")
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+
|
|
Text_UseCount.text = $"今日\n{AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount}/20";
|
|
Text_UseCount.text = $"今日\n{AccountFileInfo.Instance.playerData.todayUseExpElixrPanelCount}/20";
|
|
}
|
|
}
|
|
|
|
|