コード例 #1
0
    void runChaseLogic(float searchRadius)
    {
        Optional <Dir> dir = getChaseDirection(searchRadius);

        if (dir.isPresent())
        {
            moveDelegate.requestMove(this, dir.get());
        }
        else
        {
            moveDelegate.requestIdle();
        }
        if (moveDelegate.isLeftOrRightBlocked())
        {
            tryToJumpOverObstacle();
        }
    }