本文整理汇总了C#中Parent.ReceiveStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Parent.ReceiveStatus方法的具体用法?C# Parent.ReceiveStatus怎么用?C# Parent.ReceiveStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parent
的用法示例。
在下文中一共展示了Parent.ReceiveStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
Sentence sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey);
if(sentence != null){
tree.actions.BroadcastSentence(sentence, range);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例2: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject target = tree.GetFromBlackboard<GameObject>(targetKey);
if(target != null && tree.actions.IsInRange(target, range)){
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例3: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
object obj = tree.GetFromBlackboard<object>(key);
if(obj != null){
tree.AddToBlackboard(copyKey, obj);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例4: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject room = tree.actions.GetEmptyRoom();
if(room != null){
tree.AddToBlackboard(emptyRoomKey, room);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例5: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
if(sentence == null){
sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey);
}
if(sentence != null){
tree.actions.DisplaySentence(sentence, seconds);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例6: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject noun1 = tree.GetFromBlackboard<GameObject>(noun1Key);
GameObject noun2 = tree.GetFromBlackboard<GameObject>(noun2Key);
if(noun1 != null && noun2 != null){
tree.AddToBlackboard(sentenceKey, new Sentence(noun1, verb, noun2));
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例7: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject target = tree.GetFromBlackboard<GameObject>(targetKey);
if(target != null){
///Debug.Log("targetPoint");
//Debug.Log (target);
//Debug.Log (target.transform.position);
tree.AddToBlackboard(destinationKey, target.transform.position);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例8: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
tree.actions.SetSpeed(speed);
parent.ReceiveStatus(Status.Success);
}
示例9: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
object obj1 = tree.GetFromBlackboard<object>(obj1Key);
object obj2 = tree.GetFromBlackboard<object>(obj2Key);
//if(obj1 == default(T) || obj2 == default(T)){
// parent.ReceiveStatus(Status.Failure);
//}
//TODO CHECKS
if(obj1.Equals(obj2)){
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例10: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
if(roomKey == null){
tree.AddToBlackboard(destinationKey, tree.actions.RandomPointInRandomRoom());
}
else{
GameObject room = tree.GetFromBlackboard<GameObject>(roomKey);
if(room == null){
parent.ReceiveStatus(Status.Failure);
return;
}
tree.AddToBlackboard(destinationKey, tree.actions.RandomPointInRoom(room));
}
parent.ReceiveStatus(Status.Success);
}
示例11: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
if(inputSentence == null){
inputSentence = (Sentence) tree.GetFromBlackboard<Sentence>(inputSentenceKey);
}
if(inputSentence != null){
Sentence response = tree.eventManager.knowledgeBase.GetResponse(inputSentence);
tree.AddToBlackboard(responseKey, response);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例12: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
Debug.Log (tree.eventManager.gameObject);
Debug.Log ("says");
Debug.Log (message);
parent.ReceiveStatus(Status.Success);
}
示例13: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
Sentence sentence = (Sentence) tree.GetFromBlackboard<Sentence>(sentenceKey);
if(target == null){
target = (GameObject) tree.GetFromBlackboard<GameObject>(targetKey);
}
if(sentence != null && target != null){
tree.actions.Whisper(sentence, target);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
示例14: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject location = tree.GetFromBlackboard<GameObject>(locationKey);
if(location == null){
parent.ReceiveStatus(Status.Failure);
}
else{
GameObject aloneWith = tree.actions.GetAloneWith(location);
if(aloneWith != null){
tree.AddToBlackboard(aloneWithKey, aloneWith);
parent.ReceiveStatus(Status.Success);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}
}
示例15: Poke
public override void Poke(Parent parent)
{
base.Poke (parent);
GameObject target = tree.GetFromBlackboard<GameObject>(targetKey);
if(target != null){
tree.actions.Follow(target, this, stopping);
}
else{
parent.ReceiveStatus(Status.Failure);
}
}