|
@@ -1,7 +1,6 @@
|
|
|
using CommonAI.Zone;
|
|
|
using CommonAI.ZoneClient;
|
|
|
using CommonLang;
|
|
|
-using CommonLang.Geometry;
|
|
|
using ET.Client;
|
|
|
using ET.EventType;
|
|
|
using ET.Server;
|
|
@@ -9,8 +8,8 @@ using Sirenix.Utilities;
|
|
|
using System;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
-using System.Text.RegularExpressions;
|
|
|
using UnityEngine;
|
|
|
+using UnityEngine.Windows;
|
|
|
using XmdsCommon.Message;
|
|
|
using XmdsCommon.Plugin;
|
|
|
|
|
@@ -63,21 +62,12 @@ namespace ET
|
|
|
|
|
|
private void KeyboardCheckUpdate()
|
|
|
{
|
|
|
- if(Input.GetKeyDown(KeyCode.F1))
|
|
|
+ for(var i = KeyCode.F1; i < KeyCode.F13; i++)
|
|
|
{
|
|
|
- EventSystem.Instance.Publish(BattleFunc.Static.Clone(2));
|
|
|
- }
|
|
|
- else if(Input.GetKeyDown(KeyCode.F2))
|
|
|
- {
|
|
|
- EventSystem.Instance.Publish(BattleFunc.Static.Clone(4));
|
|
|
- }
|
|
|
- else if (Input.GetKeyDown(KeyCode.F3))
|
|
|
- {
|
|
|
- EventSystem.Instance.Publish(BattleFunc.Static.Clone(5));
|
|
|
- }
|
|
|
- else if (Input.GetKeyDown(KeyCode.F4))
|
|
|
- {
|
|
|
- EventSystem.Instance.Publish(BattleFunc.Static.Clone(3));
|
|
|
+ if(Input.GetKeyDown((KeyCode)i))
|
|
|
+ {
|
|
|
+ EventSystem.Instance.Publish(BattleFunc.Static.Clone((int)i));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -125,7 +115,6 @@ namespace ET
|
|
|
Log.Debug($"OnLayerInit- scene template ID:{layer.Data.ID}");
|
|
|
}
|
|
|
|
|
|
- bool bFirstEnemy = true;
|
|
|
//单位进入战斗
|
|
|
protected void LayerEvent_ObjectEnter(ZoneLayer layer, ZoneObject obj)
|
|
|
{
|
|
@@ -153,13 +142,9 @@ namespace ET
|
|
|
}
|
|
|
|
|
|
//Log.Debug($"OnObjectEnter: {bu.ZUnit.TemplateID}@{obj.ObjectID}");
|
|
|
- if(bFirstEnemy && bu.ZUnit.Info.Properties is XmdsUnitProperties prop)
|
|
|
+ if(bu.ZUnit.Info.Properties is XmdsUnitProperties prop && prop.GameStatusType == XmdsUnitProperties.StatusType.SpecialBoss)
|
|
|
{
|
|
|
- if (prop.GameStatusType == XmdsUnitProperties.StatusType.SpecialBoss)
|
|
|
- {
|
|
|
- bFirstEnemy = false;
|
|
|
- EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("发现怪兽来袭,宝宝们一起来守护家园吧!"));
|
|
|
- }
|
|
|
+ EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone($"发现怪兽:'<font color=#fe3824>{prop.ServerData.BaseInfo.name}</font>',你过来啊!"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -214,6 +199,11 @@ namespace ET
|
|
|
{
|
|
|
EventSystem.Instance.Publish(PlayEffectEvent.Static.Clone(launcheffect, unit.Id, CommonLang.Geometry.Vector3.Zero));
|
|
|
}
|
|
|
+
|
|
|
+ if (bunit.ZUnit.Info.Properties is XmdsUnitProperties prop)
|
|
|
+ {
|
|
|
+ EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone($"'<font color=#fe3824>{prop.ServerData.BaseInfo.name}</font>'受到了怪物的猛烈攻击"));
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
eventHandler.AddListener<ShowTipsEventB2C>((ev) =>
|
|
@@ -254,13 +244,13 @@ namespace ET
|
|
|
|
|
|
if (bunit.ZUnit.Info.Properties is XmdsUnitProperties prop)
|
|
|
{
|
|
|
- if (prop.GameStatusType == XmdsUnitProperties.StatusType.SpecialBoss)
|
|
|
+ if (prop.GameStatusType == XmdsUnitProperties.StatusType.SpecialElite)
|
|
|
{
|
|
|
- EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("花园宝宝因抵挡不住怪物致命一击,失去了所有能量"));
|
|
|
+ EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone($"'<font color=#ff7d00>{prop.ServerData.BaseInfo.name}</font>'失去了所有能量"));
|
|
|
}
|
|
|
- else
|
|
|
+ else if(prop.GameStatusType == XmdsUnitProperties.StatusType.SpecialBoss)
|
|
|
{
|
|
|
- EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("怪兽‘蝙蝠侠’,在众宝宝的合力攻击下,倒地不起"));
|
|
|
+ EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone($"'<font color=#fe3824>{prop.ServerData.BaseInfo.name}</font>',被打的倒地不起"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -336,6 +326,14 @@ namespace ET
|
|
|
vecTemp.Set(unit.ZoneObject.X, unit.ZoneObject.Y, unit.ZoneObject.Z);
|
|
|
}
|
|
|
EventSystem.Instance.Publish(PlayEffectEvent.Static.Clone(e.effect, e.ObjectID, vecTemp));
|
|
|
+
|
|
|
+ if(e.effect.Name == "chuanyunjian01")
|
|
|
+ {
|
|
|
+ if (unit is BattleUnit bu && bu.ZUnit.Info.Properties is XmdsUnitProperties prop)
|
|
|
+ {
|
|
|
+ EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone($"'<font color=#fe3824>{prop.ServerData.BaseInfo.name}</font>'快要支撑不住了,宝宝们快来注入能量"));
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
eventHandler.AddListener<XmdsUnitPropEventB2C>((ev) =>
|
|
|
{
|