当前位置: 首页>>代码示例>>C#>>正文


C# Parent.ReceiveStatus方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:12,代码来源:BroadcastSentence.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:12,代码来源:CheckInRange.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:13,代码来源:CopyToNewKey.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:13,代码来源:SetEmptyRoom.cs

示例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);
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:14,代码来源:DisplaySentence.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:15,代码来源:ConstructSentence.cs

示例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);
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:15,代码来源:SetPoint.cs

示例8: Poke

    public override void Poke(Parent parent)
    {
        base.Poke (parent);

        tree.actions.SetSpeed(speed);
        parent.ReceiveStatus(Status.Success);
    }
开发者ID:rdstn,项目名称:Project,代码行数:7,代码来源:SetSpeed.cs

示例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);
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:16,代码来源:CheckBlackboard.cs

示例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);
 }
开发者ID:rdstn,项目名称:Project,代码行数:16,代码来源:SetRandomRoom.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:17,代码来源:SetResponse.cs

示例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);
 }
开发者ID:rdstn,项目名称:Project,代码行数:8,代码来源:DebugMessage.cs

示例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);
        }
    }
开发者ID:rdstn,项目名称:Project,代码行数:17,代码来源:WhisperSentence.cs

示例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);
         }
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:18,代码来源:SetAloneWith.cs

示例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);
     }
 }
开发者ID:rdstn,项目名称:Project,代码行数:11,代码来源:Follow.cs


注:本文中的Parent.ReceiveStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。