Skip to content

Instantly share code, notes, and snippets.

use strict;
use MeCab;
my @validHinshiList = qw(名詞 動詞 形容詞 副詞 感動詞);
my %wordlist = ();
my $mecab = MeCab::Tagger->new();
while (<STDIN>) {
my $node = $mecab->parseToNode($_);
for( ; $node; $node = $node->{next} ) {
public void StopCoroutine(string methodName)
{
Main.RemoveRoutine(this, methodName);
}
// 以前にStartCorotuineで生成した、既に実行が開始しているコルーチン
Coroutine anotherCoroutine;
IEnumerator A()
{
// コルーチンの実行権がanotherCoroutineに移る
yield return anotherCoroutine;
}
IEnumerator B()
// 以前にStartCorotuineで生成した、既に実行が開始しているコルーチン
Coroutine anotherCoroutine;
IEnumerator A()
{
// コルーチンの実行権がanotherCoroutineに移る
yield return anotherCoroutine;
}
public LinkedList<LinkedList<MyLib.Coroutine>> routineList;
public LinkedList<MyLib.Coroutine> routineList;
IEnumerator A()
{
//コルーチンの実行権がBに移る
yield return StartCoroutine(B());
}
IEnumerator B()
{
// 何らかの処理
}
public void Update()
{
// すべてのMonoBehaviourを実行
foreach (MyLib.BehaviourData bdata in behaviourDict.Values)
{
if (!bdata.mainloopBegan)
{
bdata.behaviour.Start();
bdata.mainloopBegan = true;
}
public static void RemoveAllRoutines(MyLib.MonoBehaviour behaviour)
{
MyLib.BehaviourData bdata;
if (behaviourDict.TryGetValue(behaviour, out bdata))
{
bdata.routineList.Clear();
}
}
public static void RemoveRoutine(MyLib.MonoBehaviour behaviour, string methodName)
{
MyLib.BehaviourData bdata;
if (behaviourDict.TryGetValue(behaviour, out bdata))
{
LinkedListNode<MyLib.Coroutine> node = bdata.routineList.First;
while (node != null)
{
var oldNode = node;
node = node.Next;