private void UpdateFieldData(FieldModel.Param field_data, bool is_user_collection_init = true) { fieldData = field_data; if (field_data.field != null && MonoBehaviourSingleton <QuestManager> .IsValid() && is_user_collection_init) { MonoBehaviourSingleton <QuestManager> .I.resultUserCollection.Init(field_data.field); MonoBehaviourSingleton <LoungeMatchingManager> .I.SendStartField(); } }
public static void UpdateField(Action <bool> call_back = null) { MonoBehaviourSingleton <FieldManager> .I.SendInfo(delegate(bool is_get) { if (is_get) { FieldModel.Param fieldData = MonoBehaviourSingleton <FieldManager> .I.fieldData; MonoBehaviourSingleton <CoopManager> .I.coopRoom.SetSlotInfos(fieldData.field.slotInfos); } if (call_back != null) { call_back(is_get); } }); }
private static void StartCoop(Action <bool, bool> call_back = null, bool is_reentry = false) { MonoBehaviourSingleton <CoopManager> .I.Clear(); CoopNetworkManager.ConnectData webSockConnectData = MonoBehaviourSingleton <FieldManager> .I.GetWebSockConnectData(); MonoBehaviourSingleton <CoopNetworkManager> .I.ConnectAndRegist(webSockConnectData, delegate(bool is_connect, bool is_regist) { if (is_regist) { FieldModel.Param fieldData = MonoBehaviourSingleton <FieldManager> .I.fieldData; MonoBehaviourSingleton <CoopManager> .I.coopRoom.Activate(fieldData.field.slotInfos); if (call_back != null) { call_back(is_connect, is_regist); } } else if (is_reentry) { if (call_back != null) { call_back(is_connect, is_regist); } } else { MonoBehaviourSingleton <CoopApp> .I.LeaveWithParty(delegate { if (call_back != null) { call_back(is_connect, is_regist); } }, false, false); } }); }
public FieldManager() { fieldData = new FieldModel.Param(); }