Skip to content

Commit

Permalink
refactor(namespace): namespace changed to CleverCrow.Fluid.BTs
Browse files Browse the repository at this point in the history
Changed namespace to better support future fluid libraries

BREAKING CHANGE: Will cause any project using the old namespace to break
  • Loading branch information
ashblue committed May 31, 2019
1 parent 553bfef commit 073c1e9
Show file tree
Hide file tree
Showing 48 changed files with 120 additions and 120 deletions.
6 changes: 3 additions & 3 deletions Assets/FluidBehaviorTree/Runtime/BehaviorTree/BehaviorTree.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Adnc.FluidBT.TaskParents;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.TaskParents;
using CleverCrow.Fluid.BTs.Tasks;
using UnityEngine;

namespace Adnc.FluidBT.Trees {
namespace CleverCrow.Fluid.BTs.Trees {
public class BehaviorTree {
private readonly GameObject _owner;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System;
using System.Collections.Generic;
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.TaskParents;
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Tasks.Actions;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.TaskParents;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Tasks.Actions;
using UnityEngine;

namespace Adnc.FluidBT.Trees {
namespace CleverCrow.Fluid.BTs.Trees {
public class BehaviorTreeBuilder {
private readonly BehaviorTree _tree;
private readonly List<ITaskParent> _pointers = new List<ITaskParent>();
Expand Down
8 changes: 4 additions & 4 deletions Assets/FluidBehaviorTree/Runtime/Decorators/DecoratorBase.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.Generic;
using Adnc.FluidBT.TaskParents;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Trees;
using CleverCrow.Fluid.BTs.TaskParents;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Trees;
using UnityEngine;

namespace Adnc.FluidBT.Decorators {
namespace CleverCrow.Fluid.BTs.Decorators {
public abstract class DecoratorBase : ITaskParent {
public List<ITask> Children { get; } = new List<ITask>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.Decorators {
namespace CleverCrow.Fluid.BTs.Decorators {
public class DecoratorGeneric : DecoratorBase {
public Func<ITask, TaskStatus> updateLogic;

Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/Decorators/Inverter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.Decorators {
namespace CleverCrow.Fluid.BTs.Decorators {
public class Inverter : DecoratorBase {
protected override TaskStatus OnUpdate () {
if (Child == null) {
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/Decorators/ReturnFailure.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.Decorators {
namespace CleverCrow.Fluid.BTs.Decorators {
public class ReturnFailure : DecoratorBase {
protected override TaskStatus OnUpdate () {
var status = Child.Update();
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/Decorators/ReturnSuccess.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.Decorators {
namespace CleverCrow.Fluid.BTs.Decorators {
public class ReturnSuccess : DecoratorBase {
protected override TaskStatus OnUpdate () {
var status = Child.Update();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.TaskParents.Composites {
namespace CleverCrow.Fluid.BTs.TaskParents.Composites {
public abstract class CompositeBase : TaskParentBase {
public int ChildIndex { get; protected set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.TaskParents.Composites {
namespace CleverCrow.Fluid.BTs.TaskParents.Composites {
public class Parallel : CompositeBase {
private readonly Dictionary<ITask, TaskStatus> _childStatus = new Dictionary<ITask, TaskStatus>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.TaskParents.Composites {
namespace CleverCrow.Fluid.BTs.TaskParents.Composites {
public class Selector : CompositeBase {
protected override TaskStatus OnUpdate () {
for (var i = ChildIndex; i < Children.Count; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;
using Random = System.Random;

namespace Adnc.FluidBT.TaskParents.Composites {
namespace CleverCrow.Fluid.BTs.TaskParents.Composites {
/// <summary>
/// Randomly selects a child node with a shuffle algorithm
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.TaskParents.Composites {
namespace CleverCrow.Fluid.BTs.TaskParents.Composites {
public class Sequence : CompositeBase {
protected override TaskStatus OnUpdate () {
for (var i = ChildIndex; i < Children.Count; i++) {
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/TaskParents/ITaskParent.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.TaskParents {
namespace CleverCrow.Fluid.BTs.TaskParents {
public interface ITaskParent : ITask {
List<ITask> Children { get; }
ITaskParent AddChild (ITask child);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Trees;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Trees;
using UnityEngine;

namespace Adnc.FluidBT.TaskParents {
namespace CleverCrow.Fluid.BTs.TaskParents {
public abstract class TaskParentBase : ITaskParent {
public BehaviorTree ParentTree { get; set; }
public TaskStatus LastStatus { get; private set; }
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/TaskParents/TaskRoot.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;

namespace Adnc.FluidBT.TaskParents {
namespace CleverCrow.Fluid.BTs.TaskParents {
public class TaskRoot : TaskParentBase {
protected override int MaxChildren { get; } = 1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Tasks.Actions {
namespace CleverCrow.Fluid.BTs.Tasks.Actions {
public abstract class ActionBase : TaskBase {
protected abstract TaskStatus OnUpdate ();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Adnc.FluidBT.Tasks.Actions {
namespace CleverCrow.Fluid.BTs.Tasks.Actions {
public class ActionGeneric : ActionBase {
public Func<TaskStatus> updateLogic;
public Action startLogic;
Expand Down
2 changes: 1 addition & 1 deletion Assets/FluidBehaviorTree/Runtime/Tasks/Actions/Wait.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Tasks.Actions {
namespace CleverCrow.Fluid.BTs.Tasks.Actions {
public class Wait : ActionBase {
public int turns = 1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public abstract class ConditionBase : TaskBase {
protected abstract bool OnUpdate ();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public class ConditionGeneric : ConditionBase {
public Func<bool> updateLogic;
public Action startLogic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnityEngine;

namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public class RandomChance : ConditionBase {
public float chance = 1;
public float outOf = 1;
Expand Down
2 changes: 1 addition & 1 deletion Assets/FluidBehaviorTree/Runtime/Tasks/IEventAwake.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public interface IEventAwake {
void Awake ();
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/Tasks/ITask.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Adnc.FluidBT.Trees;
using CleverCrow.Fluid.BTs.Trees;
using UnityEngine;

namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public interface ITask {
/// <summary>
/// Used for debugging and identification purposes
Expand Down
4 changes: 2 additions & 2 deletions Assets/FluidBehaviorTree/Runtime/Tasks/TaskBase.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Adnc.FluidBT.Trees;
using CleverCrow.Fluid.BTs.Trees;
using UnityEngine;

namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public abstract class TaskBase : ITask {
private bool _init;
private bool _start;
Expand Down
2 changes: 1 addition & 1 deletion Assets/FluidBehaviorTree/Runtime/Tasks/TaskStatus.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Tasks {
namespace CleverCrow.Fluid.BTs.Tasks {
public enum TaskStatus {
Success,
Failure,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using NSubstitute;
using NUnit.Framework;
using UnityEngine;

namespace Adnc.FluidBT.Trees.Testing {
namespace CleverCrow.Fluid.BTs.Trees.Testing {
public class BehaviorTreeTest {
private GameObject _gameObject;
private BehaviorTree _tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Tasks.Actions;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Tasks.Actions;
using NUnit.Framework;

namespace Adnc.FluidBT.Trees.Testing {
namespace CleverCrow.Fluid.BTs.Trees.Testing {
public static class BehaviorTreeExtensionActionExamples {
public static BehaviorTreeBuilder ExampleAction (this BehaviorTreeBuilder builder, string name, Action callback) {
return builder.AddNode(new BehaviorTreeBuilderExtensionActionTest.ExtensionAction {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using NUnit.Framework;

namespace Adnc.FluidBT.Trees.Testing {
namespace CleverCrow.Fluid.BTs.Trees.Testing {
public static class BehaviorTreeExtensionCompositeExamples {
public static BehaviorTreeBuilder CustomSequence (this BehaviorTreeBuilder builder, string name) {
return builder.ParentTask<Sequence>(name);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Tasks.Actions;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Tasks.Actions;
using NUnit.Framework;

namespace Adnc.FluidBT.Trees.Testing {
namespace CleverCrow.Fluid.BTs.Trees.Testing {
public class BehaviorTreeBuilderTest {
private int _invokeCount;
private BehaviorTreeBuilder _builder;
Expand Down
2 changes: 1 addition & 1 deletion Assets/FluidBehaviorTree/Tests/Editor/Builders/A.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public static class A {
public static TaskStubBuilder TaskStub () {
return new TaskStubBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Tasks;
using NSubstitute;
using NSubstitute.ReturnsExtensions;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class TaskStubBuilder {
private bool _enabled = true;
private TaskStatus _status = TaskStatus.Success;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.Tasks;
using NUnit.Framework;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class DecoratorGenericTest {
public class UpdateMethod {
[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.Tasks;
using NSubstitute;
using NUnit.Framework;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class DecoratorTest {
public class DecoratorExample : DecoratorBase {
public TaskStatus status;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.Tasks;
using NUnit.Framework;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class InverterTest {
public class UpdateMethod {
[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.Tasks;
using NUnit.Framework;
using Assert = UnityEngine.Assertions.Assert;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class ReturnFailureTest {
public class UpdateMethod {
[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Adnc.FluidBT.Decorators;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.Decorators;
using CleverCrow.Fluid.BTs.Tasks;
using NUnit.Framework;
using Assert = UnityEngine.Assertions.Assert;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class ReturnSuccessTest {
public class UpdateMethod {
[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using Adnc.FluidBT.Trees;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Trees;
using NSubstitute;
using NUnit.Framework;
using UnityEngine;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class CompositeBaseTest {
private CompositeExample _composite;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Adnc.FluidBT.TaskParents.Composites;
using Adnc.FluidBT.Tasks;
using CleverCrow.Fluid.BTs.TaskParents.Composites;
using CleverCrow.Fluid.BTs.Tasks;
using NSubstitute;
using NUnit.Framework;

namespace Adnc.FluidBT.Testing {
namespace CleverCrow.Fluid.BTs.Testing {
public class ParallelTest {
private Parallel parallel;

Expand Down
Loading

0 comments on commit 073c1e9

Please sign in to comment.