@ -7,6 +7,7 @@ public class ExitBack : MonoBehaviour
// Start is called before the first frame update
void Start()
{
FireEnginesData.Instance.FireEnginesDataResert();
EntitiesManager.Instance.Reset();//跳转场景时要清空实体管理器中的对象
//UIManager.ResertUIManager();
//重置选择
@ -96,7 +96,10 @@ public class EntitiesManager
/// <param name="go"></param>
public void AddEntity(long id, GameObject go)
entityMap.Add(id,go);
if (!entityMap.ContainsKey(id))
}
BaseGameObjInfo baseGameObjInfo = go.GetComponent<BaseGameObjInfo>();
CloneObjType type;
@ -36,6 +36,7 @@ public class UIViewBag : UIView {
public override void OnDestroy()
base.OnDestroy();
MessageDispatcher.RemoveListener("REFRESH_UIVIEW_BAG", RefreshUI);
ButtonClose.OnClicked -= ButtonClose_OnClicked;
ButtonDelete.OnClicked -= ButtonDelete_OnClicked;
ButtonClear.OnClicked -= ButtonClear_OnClicked;
@ -69,6 +69,7 @@ public class UIViewEquipLib : UIView
MessageDispatcher.RemoveListener("REFRESH_UIVIEW_EQUIPLIB", RefreshUI);
CommitButton.OnClicked -= CommitButon_OnClicked;
@ -110,4 +110,10 @@ public class FireEnginesData
return Persons;
public void FireEnginesDataResert()
Persons.Clear();
DeptCars.Clear();