Browse Source

修改深浅拷贝Bug

pull/48/head
yjm484 1 year ago
parent
commit
438d8790d9
  1. 1245
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-Common.prefab
  2. 7
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-Common.prefab.meta
  3. 5
      ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs
  4. BIN
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/.signature.p7s
  5. 20
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/LICENSE.md
  6. BIN
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/Newtonsoft.Json.13.0.3.nupkg
  7. 71
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/README.md
  8. 10393
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.xml
  9. 9541
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.xml
  10. 9741
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.xml
  11. 11363
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.xml
  12. 11325
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.xml
  13. 11051
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.xml
  14. 11173
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard1.3/Newtonsoft.Json.xml
  15. 11338
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard2.0/Newtonsoft.Json.xml
  16. BIN
      ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/packageIcon.png
  17. 1
      ColorlessWorld-2024-4-2/Packages/manifest.json
  18. 7
      ColorlessWorld-2024-4-2/Packages/packages-lock.json
  19. BIN
      ColorlessWorld-2024-4-2/obj/Debug/Assembly-CSharp-Editor.csproj.AssemblyReference.cache
  20. 4
      ColorlessWorld-2024-4-2/packages.config

1245
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-Common.prefab

File diff suppressed because it is too large

7
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-Common.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac682e0a421cffd439cc8edb17acf108
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

5
ColorlessWorld-2024-4-2/Assets/Scripts/manager/CardManager.cs

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Newtonsoft.Json;
using UnityEngine; using UnityEngine;
public class CardManager : Singleton<CardManager> public class CardManager : Singleton<CardManager>
@ -35,7 +36,9 @@ public class CardManager : Singleton<CardManager>
public string switchCardColor(string orginalCardId, CardOriginalData cardOriginalData, string newColor) public string switchCardColor(string orginalCardId, CardOriginalData cardOriginalData, string newColor)
{ {
CardOriginalData newCardOriginalData = cardOriginalData; //CardOriginalData newCardOriginalData = new CardOriginalData();
CardOriginalData newCardOriginalData = JsonConvert.DeserializeObject<CardOriginalData>(JsonConvert.SerializeObject(cardOriginalData));
newCardOriginalData = cardOriginalData;
for (int i = 0; i < newCardOriginalData.nodesColor.Length; i++) for (int i = 0; i < newCardOriginalData.nodesColor.Length; i++)
{ {
newCardOriginalData.nodesColor[i] = newColor; newCardOriginalData.nodesColor[i] = newColor;

BIN
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/.signature.p7s

Binary file not shown.

20
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/LICENSE.md

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

BIN
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/Newtonsoft.Json.13.0.3.nupkg

Binary file not shown.

71
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/README.md

@ -0,0 +1,71 @@
# ![Logo](https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/master/Doc/icons/logo.jpg) Json.NET
[![NuGet version (Newtonsoft.Json)](https://img.shields.io/nuget/v/Newtonsoft.Json.svg?style=flat-square)](https://www.nuget.org/packages/Newtonsoft.Json/)
[![Build status](https://dev.azure.com/jamesnk/Public/_apis/build/status/JamesNK.Newtonsoft.Json?branchName=master)](https://dev.azure.com/jamesnk/Public/_build/latest?definitionId=8)
Json.NET is a popular high-performance JSON framework for .NET
## Serialize JSON
```csharp
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Sizes = new string[] { "Small" };
string json = JsonConvert.SerializeObject(product);
// {
// "Name": "Apple",
// "Expiry": "2008-12-28T00:00:00",
// "Sizes": [
// "Small"
// ]
// }
```
## Deserialize JSON
```csharp
string json = @"{
'Name': 'Bad Boys',
'ReleaseDate': '1995-4-7T00:00:00',
'Genres': [
'Action',
'Comedy'
]
}";
Movie m = JsonConvert.DeserializeObject<Movie>(json);
string name = m.Name;
// Bad Boys
```
## LINQ to JSON
```csharp
JArray array = new JArray();
array.Add("Manual text");
array.Add(new DateTime(2000, 5, 23));
JObject o = new JObject();
o["MyArray"] = array;
string json = o.ToString();
// {
// "MyArray": [
// "Manual text",
// "2000-05-23T00:00:00"
// ]
// }
```
## Links
- [Homepage](https://www.newtonsoft.com/json)
- [Documentation](https://www.newtonsoft.com/json/help)
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
- [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Contributing Guidelines](https://github.com/JamesNK/Newtonsoft.Json/blob/master/CONTRIBUTING.md)
- [License](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/json.net)

10393
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net20/Newtonsoft.Json.xml

File diff suppressed because it is too large

9541
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.xml

File diff suppressed because it is too large

9741
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net40/Newtonsoft.Json.xml

File diff suppressed because it is too large

11363
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.xml

File diff suppressed because it is too large

11325
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/net6.0/Newtonsoft.Json.xml

File diff suppressed because it is too large

11051
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard1.0/Newtonsoft.Json.xml

File diff suppressed because it is too large

11173
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard1.3/Newtonsoft.Json.xml

File diff suppressed because it is too large

11338
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/lib/netstandard2.0/Newtonsoft.Json.xml

File diff suppressed because it is too large

BIN
ColorlessWorld-2024-4-2/Packages/Newtonsoft.Json.13.0.3/packageIcon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

1
ColorlessWorld-2024-4-2/Packages/manifest.json

@ -8,6 +8,7 @@
"com.unity.ide.visualstudio": "2.0.22", "com.unity.ide.visualstudio": "2.0.22",
"com.unity.ide.vscode": "1.2.5", "com.unity.ide.vscode": "1.2.5",
"com.unity.inputsystem": "1.7.0", "com.unity.inputsystem": "1.7.0",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.render-pipelines.universal": "14.0.9", "com.unity.render-pipelines.universal": "14.0.9",
"com.unity.test-framework": "1.1.33", "com.unity.test-framework": "1.1.33",
"com.unity.textmeshpro": "3.0.6", "com.unity.textmeshpro": "3.0.6",

7
ColorlessWorld-2024-4-2/Packages/packages-lock.json

@ -115,6 +115,13 @@
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.nuget.newtonsoft-json": {
"version": "3.2.1",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
},
"com.unity.render-pipelines.core": { "com.unity.render-pipelines.core": {
"version": "14.0.9", "version": "14.0.9",
"depth": 1, "depth": 1,

BIN
ColorlessWorld-2024-4-2/obj/Debug/Assembly-CSharp-Editor.csproj.AssemblyReference.cache

Binary file not shown.

4
ColorlessWorld-2024-4-2/packages.config

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net471" />
</packages>
Loading…
Cancel
Save