|
|
|
@ -54,18 +54,34 @@ public class EngineItem : MonoBehaviour {
|
|
|
|
|
{//消防员 |
|
|
|
|
if (org == data.Value && tpyeCar.Key == null) |
|
|
|
|
{ |
|
|
|
|
//克隆一个,数量少一个,更改数据层;保证下一次打开作战部署窗口读取的数据正确 |
|
|
|
|
if (FireEnginesData.Instance.GetAllPersons().ContainsKey(data.Value.DisplayName)) |
|
|
|
|
if (GameSettings.othersSettings.mode == Mode.manoeuvre) |
|
|
|
|
{ |
|
|
|
|
FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] = |
|
|
|
|
FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] - 1; |
|
|
|
|
if (GameSettings.othersSettings.FireEngines_Dic.ContainsKey(data.Value.DisplayName)) |
|
|
|
|
{ |
|
|
|
|
GameSettings.othersSettings.FireEngines_Dic[data.Value.DisplayName] = |
|
|
|
|
GameSettings.othersSettings.FireEngines_Dic[data.Value.DisplayName] - 1; |
|
|
|
|
} |
|
|
|
|
//更新UI |
|
|
|
|
if (FireEnginesData.Instance.GetAllPersons().ContainsKey(data.Value.DisplayName)) |
|
|
|
|
{ |
|
|
|
|
transform.Find("Text").GetComponent<Text>().text = |
|
|
|
|
"消防员" + "(" + GameSettings.othersSettings.FireEngines_Dic[data.Value.DisplayName] + ")"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//更新UI |
|
|
|
|
if (FireEnginesData.Instance.GetAllPersons().ContainsKey(data.Value.DisplayName)) |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
transform.Find("Text").GetComponent<Text>().text = |
|
|
|
|
"消防员" + "(" + FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] + ")"; |
|
|
|
|
//克隆一个,数量少一个,更改数据层;保证下一次打开作战部署窗口读取的数据正确 |
|
|
|
|
if (FireEnginesData.Instance.GetAllPersons().ContainsKey(data.Value.DisplayName)) |
|
|
|
|
{ |
|
|
|
|
FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] = |
|
|
|
|
FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] - 1; |
|
|
|
|
} |
|
|
|
|
//更新UI |
|
|
|
|
if (FireEnginesData.Instance.GetAllPersons().ContainsKey(data.Value.DisplayName)) |
|
|
|
|
{ |
|
|
|
|
transform.Find("Text").GetComponent<Text>().text = |
|
|
|
|
"消防员" + "(" + FireEnginesData.Instance.GetAllPersons()[data.Value.DisplayName] + ")"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|