コード例 #1
0
ファイル: BaseAI.cs プロジェクト: lishi500/LittleMage2
    private void OnStatusChange(RoleStatus roleStatus, bool isAdd)
    {
        NavMeshAgent agent = aiUtils.GetNavMeshAgent(gameObject.transform);

        if (agent.isStopped)
        {
            if (currentRole.CanMove())
            {
                agent.isStopped = false;
            }
        }
        else
        {
            if (!currentRole.CanMove())
            {
                agent.isStopped = true;
            }
        }
    }