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
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} ) { |
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
public void StopCoroutine(string methodName) | |
{ | |
Main.RemoveRoutine(this, methodName); | |
} |
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
// 以前にStartCorotuineで生成した、既に実行が開始しているコルーチン | |
Coroutine anotherCoroutine; | |
IEnumerator A() | |
{ | |
// コルーチンの実行権がanotherCoroutineに移る | |
yield return anotherCoroutine; | |
} | |
IEnumerator B() |
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
// 以前にStartCorotuineで生成した、既に実行が開始しているコルーチン | |
Coroutine anotherCoroutine; | |
IEnumerator A() | |
{ | |
// コルーチンの実行権がanotherCoroutineに移る | |
yield return anotherCoroutine; | |
} |
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
public LinkedList<LinkedList<MyLib.Coroutine>> routineList; |
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
public LinkedList<MyLib.Coroutine> routineList; |
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
IEnumerator A() | |
{ | |
//コルーチンの実行権がBに移る | |
yield return StartCoroutine(B()); | |
} | |
IEnumerator B() | |
{ | |
// 何らかの処理 | |
} |
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
public void Update() | |
{ | |
// すべてのMonoBehaviourを実行 | |
foreach (MyLib.BehaviourData bdata in behaviourDict.Values) | |
{ | |
if (!bdata.mainloopBegan) | |
{ | |
bdata.behaviour.Start(); | |
bdata.mainloopBegan = true; | |
} |
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
public static void RemoveAllRoutines(MyLib.MonoBehaviour behaviour) | |
{ | |
MyLib.BehaviourData bdata; | |
if (behaviourDict.TryGetValue(behaviour, out bdata)) | |
{ | |
bdata.routineList.Clear(); | |
} | |
} |
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
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; |
NewerOlder