Committed everything

This commit is contained in:
2021-06-30 21:39:19 +10:00
commit fcfa8e7213
525 changed files with 49440 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using Ink.Runtime;
using UnityEngine;
namespace Ink.UnityIntegration.Debugging {
[System.Serializable]
public class InkHistoryContentItem {
public enum ContentType {
PresentedContent,
ChooseChoice,
PresentedChoice,
EvaluateFunction,
CompleteEvaluateFunction,
ChoosePathString,
Warning,
Error,
DebugNote
}
public string content;
public List<string> tags;
public ContentType contentType;
[SerializeField]
JsonDateTime _time;
public DateTime time {
get {
return _time;
} private set {
_time = value;
}
}
InkHistoryContentItem (string text, ContentType contentType) {
this.content = text;
this.contentType = contentType;
this.time = DateTime.Now;
}
InkHistoryContentItem (string text, List<string> tags, ContentType contentType) {
this.content = text;
this.tags = tags;
this.contentType = contentType;
this.time = DateTime.Now;
}
public static InkHistoryContentItem CreateForContent (string choiceText, List<string> tags) {
return new InkHistoryContentItem(choiceText, tags, InkHistoryContentItem.ContentType.PresentedContent);
}
public static InkHistoryContentItem CreateForPresentChoice (Choice choice) {
return new InkHistoryContentItem(choice.text.Trim(), InkHistoryContentItem.ContentType.PresentedChoice);
}
public static InkHistoryContentItem CreateForMakeChoice (Choice choice) {
return new InkHistoryContentItem(choice.text.Trim(), InkHistoryContentItem.ContentType.ChooseChoice);
}
public static InkHistoryContentItem CreateForEvaluateFunction (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.EvaluateFunction);
}
public static InkHistoryContentItem CreateForCompleteEvaluateFunction (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.CompleteEvaluateFunction);
}
public static InkHistoryContentItem CreateForChoosePathString (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.ChoosePathString);
}
public static InkHistoryContentItem CreateForWarning (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.Warning);
}
public static InkHistoryContentItem CreateForError (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.Error);
}
public static InkHistoryContentItem CreateForDebugNote (string choiceText) {
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.DebugNote);
}
struct JsonDateTime {
public long value;
public static implicit operator DateTime(JsonDateTime jdt) {
return DateTime.FromFileTime(jdt.value);
}
public static implicit operator JsonDateTime(DateTime dt) {
JsonDateTime jdt = new JsonDateTime();
jdt.value = dt.ToFileTime();
return jdt;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9eeba5396eb679a4fbf1e275b4da1b2c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: bf969d7f2c98e470c9797844e20b20ee
timeCreated: 1459342679
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: