|
@@ -64,7 +64,7 @@ namespace Fort23.Mono
|
|
|
|
|
|
public override CTask Show()
|
|
public override CTask Show()
|
|
{
|
|
{
|
|
- EventManager.Instance.Dispatch(CustomEventType.DialoguePanelOpen,null);
|
|
|
|
|
|
+ EventManager.Instance.Dispatch(CustomEventType.DialoguePanelOpen, null);
|
|
return base.Show();
|
|
return base.Show();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -189,13 +189,23 @@ namespace Fort23.Mono
|
|
Text_Name2.text = LanguageManager.Instance.Text(eventNpc.name);
|
|
Text_Name2.text = LanguageManager.Instance.Text(eventNpc.name);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
StartShowMassge();
|
|
StartShowMassge();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static string ReverseUsingLoop(string input)
|
|
|
|
+ {
|
|
|
|
+ if (string.IsNullOrEmpty(input))
|
|
|
|
+ return input;
|
|
|
|
+
|
|
|
|
+ StringBuilder sb = new StringBuilder(input.Length);
|
|
|
|
+ for (int i = input.Length - 1; i >= 0; i--)
|
|
|
|
+ {
|
|
|
|
+ sb.Append(input[i]);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return sb.ToString();
|
|
|
|
+ }
|
|
|
|
|
|
public void ShowPanel(int[] LanID, string[] icon,
|
|
public void ShowPanel(int[] LanID, string[] icon,
|
|
ShowDialogueEventData.MessageShowType messageShowType,
|
|
ShowDialogueEventData.MessageShowType messageShowType,
|
|
@@ -215,10 +225,10 @@ namespace Fort23.Mono
|
|
if (isOver)
|
|
if (isOver)
|
|
return;
|
|
return;
|
|
icon.gameObject.SetActive(false);
|
|
icon.gameObject.SetActive(false);
|
|
- if (eventConditionConfig.NPCID != 100 && eventConditionConfig.NPCID != 0)
|
|
|
|
|
|
+ if (eventConditionConfig.NPCID != 100 && eventConditionConfig.NPCID != 0)
|
|
{
|
|
{
|
|
EventNPC eventNpc = ConfigComponent.Instance.Get<EventNPC>(eventConditionConfig.NPCID);
|
|
EventNPC eventNpc = ConfigComponent.Instance.Get<EventNPC>(eventConditionConfig.NPCID);
|
|
-
|
|
|
|
|
|
+
|
|
icon.onSpriteAlter = () =>
|
|
icon.onSpriteAlter = () =>
|
|
{
|
|
{
|
|
icon.SetNativeSize();
|
|
icon.SetNativeSize();
|
|
@@ -226,6 +236,7 @@ namespace Fort23.Mono
|
|
};
|
|
};
|
|
icon.icon_name = eventNpc.icon;
|
|
icon.icon_name = eventNpc.icon;
|
|
}
|
|
}
|
|
|
|
+
|
|
Btn_Bag.gameObject.SetActive(false);
|
|
Btn_Bag.gameObject.SetActive(false);
|
|
if (index >= dialogueMessaga.Length)
|
|
if (index >= dialogueMessaga.Length)
|
|
{
|
|
{
|
|
@@ -234,10 +245,7 @@ namespace Fort23.Mono
|
|
{
|
|
{
|
|
ShowOptions();
|
|
ShowOptions();
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
// 所有句子显示完成,检查是否有选项
|
|
// 所有句子显示完成,检查是否有选项
|
|
if (eventConditionConfig.ID != 0 && eventConditionConfig.optionType == 1 && !_isShowingOptions)
|
|
if (eventConditionConfig.ID != 0 && eventConditionConfig.optionType == 1 && !_isShowingOptions)
|
|
@@ -246,7 +254,8 @@ namespace Fort23.Mono
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- if (eventConditionConfig.ID != 0 && _eventLinkData != null && _eventLinkData.eventConditions.Count > 0)
|
|
|
|
|
|
+ if (eventConditionConfig.ID != 0 && _eventLinkData != null &&
|
|
|
|
+ _eventLinkData.eventConditions.Count > 0)
|
|
{
|
|
{
|
|
foreach (var eventConditionData in _eventLinkData.eventConditions)
|
|
foreach (var eventConditionData in _eventLinkData.eventConditions)
|
|
{
|
|
{
|
|
@@ -265,10 +274,12 @@ namespace Fort23.Mono
|
|
List<ItemInfo> itemInfos = new List<ItemInfo>();
|
|
List<ItemInfo> itemInfos = new List<ItemInfo>();
|
|
for (var i = 0; i < eventConditionConfig.PrizeIDs.Length; i++)
|
|
for (var i = 0; i < eventConditionConfig.PrizeIDs.Length; i++)
|
|
{
|
|
{
|
|
- DropConfig dropConfig = ConfigComponent.Instance.Get<DropConfig>(eventConditionConfig.PrizeIDs[i]);
|
|
|
|
|
|
+ DropConfig dropConfig =
|
|
|
|
+ ConfigComponent.Instance.Get<DropConfig>(eventConditionConfig.PrizeIDs[i]);
|
|
if (dropConfig.dropType == 3)
|
|
if (dropConfig.dropType == 3)
|
|
{
|
|
{
|
|
- ItemInfo itemInfo = new ItemInfo(dropConfig.dropGroupID[0], eventConditionConfig.PrizeNums[i]);
|
|
|
|
|
|
+ ItemInfo itemInfo = new ItemInfo(dropConfig.dropGroupID[0],
|
|
|
|
+ eventConditionConfig.PrizeNums[i]);
|
|
itemInfos.Add(itemInfo);
|
|
itemInfos.Add(itemInfo);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -278,9 +289,12 @@ namespace Fort23.Mono
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- ShowItemMoveToTargetPanel showItemMoveToTargetUiPane = UIManager.Instance.GetComponent<ShowItemMoveToTargetPanel>();
|
|
|
|
- Vector3 target = showItemMoveToTargetUiPane.transform.worldToLocalMatrix * Btn_Bag.transform.position;
|
|
|
|
- Vector3 startPos = showItemMoveToTargetUiPane.transform.worldToLocalMatrix * StartPos.transform.position;
|
|
|
|
|
|
+ ShowItemMoveToTargetPanel showItemMoveToTargetUiPane =
|
|
|
|
+ UIManager.Instance.GetComponent<ShowItemMoveToTargetPanel>();
|
|
|
|
+ Vector3 target = showItemMoveToTargetUiPane.transform.worldToLocalMatrix *
|
|
|
|
+ Btn_Bag.transform.position;
|
|
|
|
+ Vector3 startPos = showItemMoveToTargetUiPane.transform.worldToLocalMatrix *
|
|
|
|
+ StartPos.transform.position;
|
|
int maxCount = 1;
|
|
int maxCount = 1;
|
|
|
|
|
|
foreach (var itemInfo in itemInfos)
|
|
foreach (var itemInfo in itemInfos)
|
|
@@ -288,14 +302,15 @@ namespace Fort23.Mono
|
|
int addValue = (int)itemInfo.count.Value / maxCount;
|
|
int addValue = (int)itemInfo.count.Value / maxCount;
|
|
int finishVale = (int)itemInfo.count.Value % maxCount;
|
|
int finishVale = (int)itemInfo.count.Value % maxCount;
|
|
// ItemInfo i = itemInfo;
|
|
// ItemInfo i = itemInfo;
|
|
- showItemMoveToTargetUiPane.ShowPanel(startPos, target, maxCount, itemInfo.config.icon, CombatItemShowEventData.ShowType.HeroExp, (imageMove) =>
|
|
|
|
- {
|
|
|
|
- int currAddValue = addValue;
|
|
|
|
- if (imageMove.GroupIndex == maxCount - 1)
|
|
|
|
|
|
+ showItemMoveToTargetUiPane.ShowPanel(startPos, target, maxCount, itemInfo.config.icon,
|
|
|
|
+ CombatItemShowEventData.ShowType.HeroExp, (imageMove) =>
|
|
{
|
|
{
|
|
- currAddValue += finishVale;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ int currAddValue = addValue;
|
|
|
|
+ if (imageMove.GroupIndex == maxCount - 1)
|
|
|
|
+ {
|
|
|
|
+ currAddValue += finishVale;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
await TimerComponent.Instance.WaitAsync(2000);
|
|
await TimerComponent.Instance.WaitAsync(2000);
|
|
@@ -312,10 +327,9 @@ namespace Fort23.Mono
|
|
|
|
|
|
_isShowNextButton = false;
|
|
_isShowNextButton = false;
|
|
shownextIcon.SetActive(false);
|
|
shownextIcon.SetActive(false);
|
|
- string m = LanguageManager.Instance.Text(dialogueMessaga[index],PlayerManager.Instance.PlayerName);
|
|
|
|
|
|
+ string m = LanguageManager.Instance.Text(dialogueMessaga[index], PlayerManager.Instance.PlayerName);
|
|
|
|
+
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// if (showIconName != null && index < showIconName.Length)
|
|
// if (showIconName != null && index < showIconName.Length)
|
|
// {
|
|
// {
|
|
// icon.icon_name = showIconName[index];
|
|
// icon.icon_name = showIconName[index];
|
|
@@ -354,7 +368,8 @@ namespace Fort23.Mono
|
|
{
|
|
{
|
|
DialogueOptionWidget dialogueOptionWidget =
|
|
DialogueOptionWidget dialogueOptionWidget =
|
|
await UIManager.Instance.CreateGComponent<DialogueOptionWidget>(null, OptionRoot);
|
|
await UIManager.Instance.CreateGComponent<DialogueOptionWidget>(null, OptionRoot);
|
|
- dialogueOptionWidget.CustomInit(i, CurrentEventList, eventConditionConfig.optionPara1[i], eventConditionConfig.ID, SelectOption);
|
|
|
|
|
|
+ dialogueOptionWidget.CustomInit(i, CurrentEventList, eventConditionConfig.optionPara1[i],
|
|
|
|
+ eventConditionConfig.ID, SelectOption);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|