public override int GetHashCode() { int hash = 1; if (UserId != 0) { hash ^= UserId.GetHashCode(); } if (UserName.Length != 0) { hash ^= UserName.GetHashCode(); } if (UserHead != 0) { hash ^= UserHead.GetHashCode(); } if (LastLoginTime != 0L) { hash ^= LastLoginTime.GetHashCode(); } if (CardNum != 0) { hash ^= CardNum.GetHashCode(); } if (DepartmentLevel != 0) { hash ^= DepartmentLevel.GetHashCode(); } return(hash); }
public void UE_Click() { GameHead.instance.universeData = _data.universeData; _components.wUIMenuBuildSelectObject.Inspect( _data.clickAction, _data.universeData.name, (string name) => { _data.universeData.name = name; _components.nameLabel.text = name; UserHead.SaveAllUsersData(); }, () => { wUI.user.userData.universeDatas.Remove(_data.universeData); if (wUI.user.userData.universeDatas.Count == 0) { wUI.UnstackCurrent(); } UserHead.SaveAllUsersData(); Destroy(base.gameObject); wUI.user.SaveData(); }, () => { wUI.user.userData.universeDatas.Add(new UniverseData(_data.universeData)); wUI.user.SaveData(); _components.parent.Inspect(wUI.user.userData.universeDatas); } ); }
public void UE_Click() { // mb find better way to enumerate :/ Action moveToAction = null; if (_data.editableData is SandboxObjectData) { moveToAction = () => { ((EntryWUI)wUI).Move(_data.editableData); }; } _components.wUIMenuBuildSelectObject.Inspect(() => { EditorHead.instance.Edit(_data.universeData, _data.editableData); }, _data.editableData.name, (string name) => { _data.editableData.name = name; _components.nameLabel.text = name; UserHead.SaveAllUsersData(); }, () => { if (_data.editableData is SandboxObjectData) { _data.universeData.objects.Remove(_data.editableData); } else { _data.universeData.maps.Remove(_data.editableData); } UserHead.SaveAllUsersData(); Destroy(base.gameObject); UserHead.SaveAllUsersData(); }, () => { if (_data.editableData is SandboxObjectData) { _data.universeData.objects.Add(new SandboxObjectData((SandboxObjectData)_data.editableData)); } else { _data.universeData.maps.Add(new SandboxData((SandboxData)_data.editableData)); } UserHead.SaveAllUsersData(); _components.parent.Inspect(_data.universeData); }, moveToAction ); }
public void UE_NewGame() { UniverseData universeData = new UniverseData { name = "test", maps = new List <EditableData>(), objects = new List <EditableData>(), }; wUI.user.userData.universeDatas.Add(universeData); _components.wUIMenuBuildEditExisting.Inspect(universeData); UserHead.SaveAllUsersData(); }
public void UE_CreateNew() { if (_data.editorType == EditorType.Object) { SandboxObjectData sandboxObjectData = EditorHead.instance.NewSandboxObject(_data.universeData.GenerateUniqueId(), _data.universeData.GenerateUniqueId()); sandboxObjectData.category = _data.activeCategory; _data.universeData.objects.Add(sandboxObjectData); } else { SandboxData sandboxData = EditorHead.instance.NewSandbox(_data.universeData.GenerateUniqueId()); _data.universeData.maps.Add(sandboxData); } UserHead.SaveAllUsersData(); Refresh(); }
internal void SaveData() { UserHead.SaveUserData(this); }
private void Refresh() { UserHead.SaveAllUsersData(); Populate(_data.editorType == EditorType.Map ? _data.universeData.maps : _data.universeData.objects); }
internal void Save() { editableData.modules = editable.GetModuleSaveData(); UserHead.SaveAllUsersData(); }
private void OnChooseCategory(string category) { _data.editableData.category = category; UserHead.SaveAllUsersData(); Unstack(); }