Skip to content

只有run函数,没有进入退出之类的吗? #17

Open

Description

@Ailtop

只有run函数,没有进入退出之类的吗?

Activity

  1. xcoding1024 commented on Jun 4, 2025

    @xcoding1024
    Owner

    你所说的进入和退出指的是什么,中断和继续吗

  2. Ailtop commented on Jun 5, 2025

    @Ailtop
    Author

    类似于生命周期吧,中断也是,主要是为了方便做一些初始化和还原状态等等。很多行为树框架都有这种生命周期
    https://github.com/CatImmortal/CatBehaviour/blob/main/Assets/Scripts/CatBehaviour/Runtime/Node/BaseNode.cs
    https://github.com/AkiKurisu/AkiBT/blob/main/Runtime/Core/Model/Node/Root.cs

  3. xcoding1024 commented on Jun 9, 2025

    @xcoding1024
    Owner

    不知道你是不是想实现类似挂起或者恢复的状态,如果是的话,节点返回的RUNNING和ABORT两种基本能满足需求,再次运行run从上次中断的位置继续运行。如果你指的是多线程的中断,那就不支持了,本项目是基于单线程设计的。

  4. xcoding1024 commented on Jun 9, 2025

    @xcoding1024
    Owner

    interrupt函数可以取消原本的RUNNING状态,再下次run就是从根节点运行

  5. junbinliuext commented on Sep 9, 2025

    @junbinliuext

    你所说的进入和退出指的是什么,中断和继续吗

    应该是想实现类似状态一样的enter和exit之类?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions