Browse Source

选择技能时可在头顶显示相关文字,技能包括:侦查、安全员、水源引导、警戒、引导员。以及其同步

develop
曹衍涛 4 years ago
parent
commit
c86e931338
  1. 45
      Assets/Scripts/Common/NetworkSystem/NetWorkSync/FIREMAN_WORKTYPECHANGE_SYNC.cs
  2. 68
      Assets/Scripts/DongYouLiQing/BaseCommander/SkillPanel/FireManSkillPanelController.cs

45
Assets/Scripts/Common/NetworkSystem/NetWorkSync/FIREMAN_WORKTYPECHANGE_SYNC.cs

@ -1,4 +1,5 @@
using AX.MessageSystem;
using AX.InputSystem;
using AX.MessageSystem;
using AX.Network.Protocols;
using AX.Serialization;
using System.Collections;
@ -31,6 +32,48 @@ public class FIREMAN_WORKTYPECHANGE_SYNC : NetworkMessageBehaviour
MessageDispatcher.SendMessage("Update4GTransferUsers");
}
this.preWorkType = info.worktype;
if (info.worktype==FireManSkills.SafetyOfficer)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName + "<color=red> 安全员 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
if (info.worktype == FireManSkills.TagSearchRoom)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName + "<color=red> 侦察 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
if (info.worktype == FireManSkills.Usher)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName + "<color=red> 引导员 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
if (info.worktype == FireManSkills.WaterGuiding)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName + "<color=red> 水源引导 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
if (info.worktype == FireManSkills.GuardAgainst)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName + "<color=red> 警戒 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
if (info.worktype == FireManSkills.None)
{
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}
}
}

68
Assets/Scripts/DongYouLiQing/BaseCommander/SkillPanel/FireManSkillPanelController.cs

@ -321,6 +321,19 @@ public class FireManSkillPanelController : MonoBehaviour
if (value)
{
InputManager.cloneObjType = CloneObjType.None;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.Usher;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName + "-<color=red> 引导员 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
else
{
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}
@ -361,6 +374,19 @@ public class FireManSkillPanelController : MonoBehaviour
if (value)
{
InputManager.cloneObjType = CloneObjType.None;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.WaterGuiding;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName + "<color=red> 水源引导 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
else
{
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}
@ -369,6 +395,19 @@ public class FireManSkillPanelController : MonoBehaviour
if (value)
{
InputManager.cloneObjType = CloneObjType.None;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.GuardAgainst;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName + "-<color=red> 警戒 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
else
{
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}
@ -377,6 +416,20 @@ public class FireManSkillPanelController : MonoBehaviour
if (value)
{
InputManager.cloneObjType = CloneObjType.None;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.SafetyOfficer;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName + "-<color=red> 安全员 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
else
{
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}
@ -404,6 +457,21 @@ public class FireManSkillPanelController : MonoBehaviour
if (value)
{
InputManager.cloneObjType = CloneObjType.None;
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.TagSearchRoom;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName + "-<color=red> 侦察 </color>";
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
else
{
SelectFireMan.GetComponent<FireManControl>().workType = FireManSkills.None;
ChangeUINameCmdArgs arg = new ChangeUINameCmdArgs();
arg.gameObjID = SelectFireMan.GetComponent<CloneGameObjInfo>().gameObjID;
arg.Value = SelectFireMan.GetComponent<CloneGameObjInfo>().FullName;
MessageDispatcher.SendMessage("CHANGE_HEAD_NAME", arg);
}
}

Loading…
Cancel
Save