protected override void Purge() { base.Purge(); RoleCardSelectedEvent?.RemoveAllListeners(); mRoleCardData = default; m_RoleCardImage = default; }
private void OnRoleCardSelectedHandler(CampRoleModel target) { if (SelectedRoleModel != default) { SelectedRoleModel.SetUserControll(false); } SelectedRoleModel = target; SelectedRoleModel.SetUserControll(true); FWConsts.SERVER_FW_DATAS.DeliveParam <FWDataServer, ICommonRole>("SetUserFWRole", "SetUserFWRole", OnSetUserFWRole, true); }
public void AddCampRole(IFWRole role) { int key = mCampRoleMapper.Size; CampRoleModel model = new CampRoleModel { role = role, controllIndex = key }; mCampRoleMapper[key] = model; DataChanged(FWConsts.DC_CAMP_ROLE_CREATED); }