|
|
|
@ -65,6 +65,25 @@ public class ObjSelectCtrl : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
if (hitObj == gameObject) |
|
|
|
|
{ |
|
|
|
|
if (SelectedObjs.selectedCharacters.Count>0) |
|
|
|
|
{ |
|
|
|
|
if (gameObject != SelectedObjs.selectedCharacters[0]) |
|
|
|
|
{ |
|
|
|
|
if(FireManSkillsPanel.GetInstance.gameObject.activeInHierarchy) |
|
|
|
|
{//目前是单选消防员状态 |
|
|
|
|
if (SelectedObjs.selectedCharacters[0].GetComponent<FireManMessage>().workType == FireManSkills.SprayWater) |
|
|
|
|
{ |
|
|
|
|
if (!SelectedObjs.selectedCharacters[0].GetComponentInChildren<ParticleControlOfType>()) |
|
|
|
|
{//单选的是消防员但是没有出水 |
|
|
|
|
//点击出水按钮但是没有选择出水类型导致 |
|
|
|
|
SelectedObjs.selectedCharacters[0].GetComponent<FireManMessage>().workType = FireManSkills.None; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
clearSelection(); |
|
|
|
|
|
|
|
|
|
if (hitObj.tag != "Player") |
|
|
|
@ -88,9 +107,26 @@ public class ObjSelectCtrl : MonoBehaviour
|
|
|
|
|
private void EscCancelSelected(IMessage obj) |
|
|
|
|
{ |
|
|
|
|
if (SelectedObjs.selectedObj == gameObject || SelectedObjs.selectedCharacters.Contains(gameObject)) |
|
|
|
|
{ |
|
|
|
|
if (SelectedObjs.selectedCharacters.Count > 0) |
|
|
|
|
{//目前是单选消防员状态 |
|
|
|
|
//if (FireManSkillsPanel.GetInstance.gameObject.activeInHierarchy) |
|
|
|
|
{ |
|
|
|
|
if (SelectedObjs.selectedCharacters[0].GetComponent<FireManMessage>().workType == FireManSkills.SprayWater) |
|
|
|
|
{//当前是出水技能但是没有水粒子 |
|
|
|
|
if (!SelectedObjs.selectedCharacters[0].GetComponentInChildren<ParticleControlOfType>()) |
|
|
|
|
{ |
|
|
|
|
SelectedObjs.selectedCharacters[0].GetComponent<FireManMessage>().workType = FireManSkills.None; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
clearSelection(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void CancelObjSelected(IMessage obj) |
|
|
|
|
{ |
|
|
|
|
//AddRecordEventSelect(RecordEventType.CancelObjSelected); |
|
|
|
@ -163,18 +199,6 @@ public class ObjSelectCtrl : MonoBehaviour
|
|
|
|
|
DoDisSelect(SelectedObjs.selectedObj); |
|
|
|
|
SelectedObjs.selectedObj = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (FireManSkillsPanel.GetInstance.gameObject.activeInHierarchy) |
|
|
|
|
{ |
|
|
|
|
if (FireManSkillsPanel.GetInstance.GetSprayOn()) |
|
|
|
|
{ |
|
|
|
|
if (FireManSkillsPanel.GetInstance.chooseObj.GetComponentInChildren<ParticleControlOfType>() == null) |
|
|
|
|
{ |
|
|
|
|
FireManSkillsPanel.GetInstance.CloseSprayToggle(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
for (int i = SelectedObjs.selectedCharacters.Count - 1; i >= 0; i--) |
|
|
|
|
{ |
|
|
|
|
DoDisSelect(SelectedObjs.selectedCharacters[i]); |
|
|
|
|