Skip to content

Commit

Permalink
3.6.25
Browse files Browse the repository at this point in the history
  • Loading branch information
cainhuang committed Mar 16, 2017
1 parent 12ef9d8 commit 42062e1
Show file tree
Hide file tree
Showing 131 changed files with 3,228 additions and 1,124 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cmake_minimum_required (VERSION 2.8)
# set(CMAKE_CONFIGURATION_TYPES "Debug;Release;Profile" CACHE STRING "" FORCE)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)

set (BEHAVIAC_PACKAGE_VERSION 3.6.24)
set (BEHAVIAC_PACKAGE_VERSION 3.6.25)

#option( BUILD_SHARED_LIBS "set to OFF to build static libraries" ON )
SET(BUILD_SHARED_LIBS ON CACHE BOOL "set to OFF to build static libraries")
Expand Down Expand Up @@ -409,3 +409,4 @@ add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_2/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_3/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_4/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_5/cpp")
add_subdirectory ("${PROJECT_SOURCE_DIR}/tutorials/tutorial_6/cpp")
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/Tencent/behaviac/blob/master/license.txt)
[![Release Version](https://img.shields.io/badge/release-3.6.24-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Release Version](https://img.shields.io/badge/release-3.6.25-red.svg)](https://github.com/Tencent/behaviac/releases)
[![Updates](https://img.shields.io/badge/Platform-iOS | Android | Windows | Linux | Unity -brightgreen.svg)](https://github.com/Tencent/behaviac/blob/master/history.txt)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/behaviac/pulls)

Expand Down

Large diffs are not rendered by default.

Binary file modified docs/behaviac.chm
Binary file not shown.
4 changes: 4 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2017-3-16 3.6.25
Support renaming types.
Add the tutorial_6 projects.

2017-3-10 3.6.24
Add the tutorial_1_1 and tutorial_1_2.
Add the Const setting for the parameters of the method.
Expand Down
2 changes: 1 addition & 1 deletion inc/behaviac/common/_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#define BEHAVIAC_RELEASE 0
#endif

#define BEHAVIAC_VERSION_STRING "3.6.24"
#define BEHAVIAC_VERSION_STRING "3.6.25"

8 changes: 8 additions & 0 deletions inc/behaviac/common/workspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ namespace behaviac {
class BehaviorTreeTask;
class Agent;

/*! \addtogroup Workspace
* @{
* \addtogroup Workspace
* @{ */

/**
Workspace is used to manage the file format, time, load/unload/update bt, debug and so on.
*/
class BEHAVIAC_API Workspace {
public:
BEHAVIAC_DECLARE_MEMORY_OPERATORS(Workspace);
Expand Down
8 changes: 8 additions & 0 deletions integration/demo_running/behaviac/Base/LogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ virtual protected System.IO.StreamWriter GetFile(Agent pAgent)
{
buffer = string.Format("Agent_$_{0:3}.log", agentId);
}

#if !BEHAVIAC_NOT_USE_UNITY
if (UnityEngine.Application.platform != UnityEngine.RuntimePlatform.WindowsEditor &&
UnityEngine.Application.platform != UnityEngine.RuntimePlatform.WindowsPlayer)
{
buffer = Path.Combine(UnityEngine.Application.persistentDataPath, buffer);
}
#endif
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions integration/demo_running/behaviac/Base/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,8 @@ public static void Break(string msg)
LogError(msg);

#if !BEHAVIAC_NOT_USE_UNITY
//UnityEngine.Debug.Break();
System.Diagnostics.Debug.Assert(false);
UnityEngine.Debug.Break();
//System.Diagnostics.Debug.Assert(false);
#else
//throw new Exception();
System.Diagnostics.Debug.Assert(false);
Expand Down
3 changes: 3 additions & 0 deletions integration/demo_running/behaviac/FSM/WaitState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,21 @@ protected override EBTStatus update(Agent pAgent, EBTStatus childStatus)
{
Debug.Check(childStatus == EBTStatus.BT_RUNNING);
Debug.Check(this.m_node is WaitState, "node is not an WaitState");
WaitState pStateNode = (WaitState)this.m_node;

if (Workspace.Instance.UseIntValue)
{
if (Workspace.Instance.IntValueSinceStartup - this.m_intStart >= this.m_intTime)
{
pStateNode.Update(pAgent, out this.m_nextStateId);
return EBTStatus.BT_SUCCESS;
}
}
else
{
if (Workspace.Instance.DoubleValueSinceStartup - this.m_start >= this.m_time)
{
pStateNode.Update(pAgent, out this.m_nextStateId);
return EBTStatus.BT_SUCCESS;
}
}
Expand Down
145 changes: 38 additions & 107 deletions integration/demo_running/behaviac/license.txt
Original file line number Diff line number Diff line change
@@ -1,138 +1,69 @@
Tencent is pleased to support the open source community by making behaviac available.

Copyright (C) 2015 THL A29 Limited, a Tencent company. All rights reserved.

If you have downloaded a copy of the behaviac binary from Tencent, please note that the behaviac
binary is licensed under the BSD 3-Clause License.
If you have downloaded a copy of the behaviac source code from Tencent, please note that behaviac
source code is licensed under the BSD 3-Clause License, except for the third-party components
listed below which are subject to different license terms. Your integration of behaviac into
your own projects may require compliance with the BSD 3-Clause License, as well as the other
licenses applicable to the third-party components included within behaviac.

Tencent is pleased to support the open source community by making Behaviac available.
Copyright (C) 2015-2017 THL A29 Limited, a Tencent company. All rights reserved.
If you have downloaded a copy of the Behaviac binary from Tencent, please note that the Behaviac binary is licensed under the BSD 3-Clause License.
If you have downloaded a copy of the Behaviac source code from Tencent, please note that Behaviac source code is licensed under the BSD 3-Clause License, except for the third-party components listed below which are subject to different license terms. Your integration of Behaviac into your own projects may require compliance with the BSD 3-Clause License, as well as the other licenses applicable to the third-party components included within Behaviac.
A copy of the BSD 3-Clause License is included in this file.

Other dependencies and licenses:

Open Source Software Licensed Under the BSD License: The below software in this distribution may
have been modified by THL A29 Limited (��Tencent Modifications��). All Tencent Modifications are
Copyright (C) 2015 THL A29 Limited.
Open Source Software Licensed Under the University of Illinois/NCSA Open Source License: The below software in this distribution may have been modified by THL A29 Limited (��Tencent Modifications��). All Tencent Modifications are Copyright (C) 2015-2017 THL A29 Limited.
--------------------------------------------------------------------
1. LLVM - ConvertUTF.c 3.9.1
Copyright 2001-2004 Unicode, Inc.

The Brainiac Designer V2.1
Copyright (c) 2008, Daniel Kollmann
All rights reserved.

Nsubstitute V1.7.1
Copyright (c) 2009, Anthony Egerton ([email protected]) and David Tchepak ([email protected])
All rights reserved.
Terms of the University of Illinois/NCSA Open Source License:
---------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
? Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
? Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
? Neither the names of <Name of Development Group, Name of Institution>, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

Libbehavior V1.0
Copyright (c) 2009, LeegleechN
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Open Source Software Licensed Under the MIT License: The below software in this distribution may have been
modified by THL A29 Limited (��Tencent Modifications��). All Tencent Modifications are Copyright (C) 2015 THL
A29 Limited.
Open Source Software Licensed Under the MIT License: The below software in this distribution may have been modified by THL A29 Limited (��Tencent Modifications��). All Tencent Modifications are Copyright (C) 2015-2017 THL A29 Limited.
--------------------------------------------------------------------

RapidXml V1.13
1. RapidXml V 1.13
Copyright (c) 2006, 2007 Marcin Kalicinski
All Rights Reserved.

DockPanel V2.0
2. DockPanel V 2.0.0
Copyright (c) 2007 Weifen Luo
All Rights Reserved.

nunit-framework V3.0
3. nunit-framework V 3.0.0
Copyright (c) 2014 Charlie Poole
All Rights Reserved.

Terms of the MIT License:
---------------------------------------------------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without
limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Terms of the MIT License:
---------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Open Source Software Licensed Under the zlib License:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

SDL V2.0.3
Copyright (C) 1997-2014 Sam Lantinga ([email protected])
All Rights Reserved.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SDL_image V2.0.0
Copyright (C) 1997-2013 Sam Lantinga ([email protected])
All Rights Reserved.

SDL_ttf V2.0.12
Copyright (C) 1997-2014 Sam Lantinga ([email protected])
All Rights Reserved.
Open Source Software Licensed Under the BSD 3-Clause License: The below software in this distribution may have been modified by THL A29 Limited (��Tencent Modifications��). All Tencent Modifications are Copyright (C) 2015-2017 THL A29 Limited.
--------------------------------------------------------------------
1. Brainiac Designer V 2.1
Copyright (c) 2008, Daniel Kollmann
All rights reserved.

Terms of the zlib License:
---------------------------------------------------
2. Nsubstitute V 1.7.1
Copyright (c) 2009 Anthony Egerton ([email protected]) and David Tchepak ([email protected])
All rights reserved.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors
be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications,
and to alter it and redistribute it freely, subject to the following restrictions:
Terms of the BSD 3-Clause License:
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original
software. If you use this software in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the
original software.
3. This notice may not be removed or altered from any source distribution.
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Terms of the BSD 3-Clause License:
--------------------------------------------------------------------
3. Neither the name of THL A29 Limited nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of THL A29 Limited nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion integration/demo_running/behaviac/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.24
3.6.25
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ virtual protected System.IO.StreamWriter GetFile(Agent pAgent)
{
buffer = string.Format("Agent_$_{0:3}.log", agentId);
}

#if !BEHAVIAC_NOT_USE_UNITY
if (UnityEngine.Application.platform != UnityEngine.RuntimePlatform.WindowsEditor &&
UnityEngine.Application.platform != UnityEngine.RuntimePlatform.WindowsPlayer)
{
buffer = Path.Combine(UnityEngine.Application.persistentDataPath, buffer);
}
#endif
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,8 @@ public static void Break(string msg)
LogError(msg);

#if !BEHAVIAC_NOT_USE_UNITY
//UnityEngine.Debug.Break();
System.Diagnostics.Debug.Assert(false);
UnityEngine.Debug.Break();
//System.Diagnostics.Debug.Assert(false);
#else
//throw new Exception();
System.Diagnostics.Debug.Assert(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,21 @@ protected override EBTStatus update(Agent pAgent, EBTStatus childStatus)
{
Debug.Check(childStatus == EBTStatus.BT_RUNNING);
Debug.Check(this.m_node is WaitState, "node is not an WaitState");
WaitState pStateNode = (WaitState)this.m_node;

if (Workspace.Instance.UseIntValue)
{
if (Workspace.Instance.IntValueSinceStartup - this.m_intStart >= this.m_intTime)
{
pStateNode.Update(pAgent, out this.m_nextStateId);
return EBTStatus.BT_SUCCESS;
}
}
else
{
if (Workspace.Instance.DoubleValueSinceStartup - this.m_start >= this.m_time)
{
pStateNode.Update(pAgent, out this.m_nextStateId);
return EBTStatus.BT_SUCCESS;
}
}
Expand Down
Loading

0 comments on commit 42062e1

Please sign in to comment.