-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5522c2d
commit a3ef6aa
Showing
243 changed files
with
62,041 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?><configuration> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="netstandard" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Core" publicKeyToken="b77a5c561934e089" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.1.5.0" newVersion="4.1.5.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using Newtonsoft.Json; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
[CreateAssetMenu] | ||
public class ConversationData : ScriptableObject | ||
{ | ||
[SerializeField] private TaggedImages images; | ||
[SerializeField] private string jsonFileName; | ||
[SerializeField] private List<ConversationLine> conversationLines; | ||
|
||
public IEnumerable<ConversationLine> Conversation => conversationLines; | ||
|
||
[ContextMenu("PopulateFromJson")] | ||
private void PopulateFromJson() | ||
{ | ||
var jsonString = File.ReadAllText(jsonFileName); | ||
var lines = JsonSerializer.Create() | ||
.Deserialize<List<Intermediary>>(new JsonTextReader(new StringReader(jsonString))); | ||
|
||
conversationLines = lines?.Select(ToLine).ToList(); | ||
} | ||
|
||
private ConversationLine ToLine(Intermediary line) | ||
{ | ||
return new ConversationLine | ||
{ | ||
Image = images.GetImageFromTag(line.ImageTag), | ||
Text = line.Text | ||
}; | ||
} | ||
|
||
[System.Serializable] | ||
private class Intermediary | ||
{ | ||
[field: SerializeField] | ||
public string ImageTag { get; set; } | ||
|
||
[field: SerializeField] | ||
public string Text { get; set; } | ||
} | ||
} | ||
|
||
[System.Serializable] | ||
public class ConversationLine | ||
{ | ||
[field: SerializeField] | ||
public Image Image { get; set; } | ||
|
||
[field:SerializeField] | ||
public string Text { get; set; } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class TaggedImages : ScriptableObject | ||
{ | ||
[SerializeField] private List<TaggedImage> taggedImages; | ||
|
||
public Image GetImageFromTag(string imageTag) | ||
{ | ||
return taggedImages.Find(image => image.Tag == imageTag)?.Image; | ||
} | ||
|
||
|
||
[System.Serializable] | ||
private class TaggedImage | ||
{ | ||
public string Tag { get; set; } | ||
public Image Image { get; set; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+18.3 KB
Packages/Microsoft.Bcl.AsyncInterfaces.7.0.0-rc.1.22426.10/.signature.p7s
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
Packages/Microsoft.Bcl.AsyncInterfaces.7.0.0-rc.1.22426.10/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Packages/Microsoft.Bcl.AsyncInterfaces.7.0.0-rc.1.22426.10/LICENSE.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) .NET Foundation and Contributors | ||
|
||
All rights reserved. | ||
|
||
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. |
Binary file added
BIN
+89.5 KB
...yncInterfaces.7.0.0-rc.1.22426.10/Microsoft.Bcl.AsyncInterfaces.7.0.0-rc.1.22426.10.nupkg
Binary file not shown.
Oops, something went wrong.