V3.2.1 向InGameMessageBox添加颜色功能 整理代码

V3.2.1 向InGameMessageBox添加颜色功能 整理代码
This commit is contained in:
2023-08-15 19:47:14 +09:00
parent 709f7cf9d3
commit 3381c83604
14 changed files with 887 additions and 860 deletions
+8 -4
View File
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using UnityEngine;
public class MouseInMap : MonoBehaviour
@@ -64,7 +65,8 @@ public class MouseInMap : MonoBehaviour
if (IsAgentorEnemyWithinDistance(targetDistanceThreshold))
{
// if agent or enemy is nearby, do not create new block
messageCon.PushMessage("Agent or Enemy is too close!");
messageCon.PushMessage(new List<string> { "Agent or Enemy is too close!" },
new List<string> { "#800000ff" });
}
else
{
@@ -80,7 +82,8 @@ public class MouseInMap : MonoBehaviour
if (IsAgentorEnemyWithinDistance(targetDistanceThreshold))
{
// if agent or enemy is nearby, do not create new block
messageCon.PushMessage("Agent or Enemy is too close!");
messageCon.PushMessage(new List<string> { "Agent or Enemy is too close!" },
new List<string> { "#800000ff" });
}
else
{
@@ -95,7 +98,8 @@ public class MouseInMap : MonoBehaviour
case MouseMode.EnemySet:
if (IsAgentorEnemyWithinDistance(enemyDistanceThreshold))
{
messageCon.PushMessage("Agent or Enemy is too close!");
messageCon.PushMessage(new List<string> { "Agent or Enemy is too close!" },
new List<string> { "#800000ff" });
}
else
{
@@ -131,7 +135,7 @@ public class MouseInMap : MonoBehaviour
case MouseMode.EnemySet:
preSet = enemyCon.enemyPrefab;
mousePreviewCon.ChangePreviewTo(preSet,true);
mousePreviewCon.ChangePreviewTo(preSet, true);
break;
default: