Ink Integration
Initial integration of Ink scripting - simply runs the first story it finds.
This commit is contained in:
parent
9779afb1bb
commit
82c8041765
215 changed files with 23662 additions and 17 deletions
28
Assets/Ink/ink-engine-runtime/StringJoinExtension.cs
Normal file
28
Assets/Ink/ink-engine-runtime/StringJoinExtension.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Ink.Runtime
|
||||
{
|
||||
public static class StringExt
|
||||
{
|
||||
public static string Join<T>(string separator, List<T> objects)
|
||||
{
|
||||
var sb = new StringBuilder ();
|
||||
|
||||
var isFirst = true;
|
||||
foreach (var o in objects) {
|
||||
|
||||
if (!isFirst)
|
||||
sb.Append (separator);
|
||||
|
||||
sb.Append (o.ToString ());
|
||||
|
||||
isFirst = false;
|
||||
}
|
||||
|
||||
return sb.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in a new issue