Skip to content
This repository was archived by the owner on Apr 3, 2022. It is now read-only.

Commit fa69aa8

Browse files
committed
Merge branch 'master' into develop
2 parents b1fefe7 + 51715ea commit fa69aa8

File tree

64 files changed

+156401
-155539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+156401
-155539
lines changed

.github/FUNDING.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using MoreMountains.TopDownEngine;
2+
using MoreMountains.Tools;
3+
using TheBitCave.MMToolsExtensions.AI.Graph;
4+
using UnityEngine;
5+
6+
namespace TheBitCave.TopDownEngineExensions.AI.Graph
7+
{
8+
/// <summary>
9+
/// A node representing a TopDown Engine <see cref="MoreMountains.TopDownEngine.AIActionAimObject"/> action.
10+
/// </summary>
11+
[CreateNodeMenu("AI/Action/Aim Object")]
12+
public class AIActionAimObjectNode: AIActionNode
13+
{
14+
// gameObjectToAim is hidden from inspector as it cannot be easily assigned at generation time
15+
// public GameObject gameObjectToAim;
16+
17+
public AIActionAimObject.Modes mode = AIActionAimObject.Modes.Movement;
18+
public AIActionAimObject.PossibleAxis axis = AIActionAimObject.PossibleAxis.Right;
19+
20+
public bool interpolate = false;
21+
// [MMCondition("Interpolate", true)]
22+
public float interpolateRate = 5f;
23+
24+
public override AIAction AddActionComponent(GameObject go)
25+
{
26+
var action = go.AddComponent<AIActionAimObject>();
27+
action.Label = label;
28+
// action.GameObjectToAim = gameObjectToAim;
29+
action.Mode = mode;
30+
action.Axis = axis;
31+
action.Interpolate = interpolate;
32+
action.InterpolateRate = interpolateRate;
33+
34+
return action;
35+
}
36+
37+
}
38+
}

Common/Scripts/AI/Graph/Actions/AIActionAimObjectNode.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using MoreMountains.Feedbacks;
2+
using MoreMountains.TopDownEngine;
3+
using MoreMountains.Tools;
4+
using TheBitCave.MMToolsExtensions.AI.Graph;
5+
using UnityEngine;
6+
7+
namespace TheBitCave.TopDownEngineExensions.AI.Graph
8+
{
9+
/// <summary>
10+
/// A node representing a TopDown Engine <see cref="MoreMountains.TopDownEngine.AIActionMMFeedbacks"/> action.
11+
/// </summary>
12+
[CreateNodeMenu("AI/Action/MM Feedbacks")]
13+
public class AIActionMMFeedbacksNode : AIActionNode
14+
{
15+
// targetFeedbacks is hidden from inspector as it cannot be easily assigned at generation time
16+
// public MMFeedbacks targetFeedbacks;
17+
public bool onlyPlayWhenEnteringState;
18+
19+
public override AIAction AddActionComponent(GameObject go)
20+
{
21+
var action = go.AddComponent<AIActionMMFeedbacks>();
22+
action.Label = label;
23+
// action.TargetFeedbacks = targetFeedbacks;
24+
action.OnlyPlayWhenEnteringState = onlyPlayWhenEnteringState;
25+
return action;
26+
}
27+
}
28+
}

Common/Scripts/AI/Graph/Actions/AIActionMMFeedbacksNode.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using MoreMountains.TopDownEngine;
2+
using MoreMountains.Tools;
3+
using TheBitCave.MMToolsExtensions.AI.Graph;
4+
using UnityEngine;
5+
6+
namespace TheBitCave.TopDownEngineExensions.AI.Graph
7+
{
8+
/// <summary>
9+
/// A node representing a TopDown Engine <see cref="MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid"/> action.
10+
/// </summary>
11+
[CreateNodeMenu("AI/Action/Move Randomly Grid")]
12+
public class AIActionMoveRandomlyGridNode : AIActionNode
13+
{
14+
public AIActionMoveRandomlyGrid.Modes mode = AIActionMoveRandomlyGrid.Modes.ThreeD;
15+
public float maximumDurationInADirection = 3f;
16+
public LayerMask obstacleLayerMask;
17+
public float obstaclesDetectionDistance = 1f;
18+
public float obstaclesCheckFrequency = 1f;
19+
public Vector2 minimumRandomDirection = new Vector2(-1f, -1f);
20+
public Vector2 maximumRandomDirection = new Vector2(1f, 1f);
21+
public bool avoid180 = true;
22+
23+
public override AIAction AddActionComponent(GameObject go)
24+
{
25+
var action = go.AddComponent<AIActionMoveRandomlyGrid>();
26+
action.Label = label;
27+
action.Mode = mode;
28+
action.MaximumDurationInADirection = maximumDurationInADirection;
29+
action.ObstacleLayerMask = obstacleLayerMask;
30+
action.ObstaclesDetectionDistance = obstaclesDetectionDistance;
31+
action.ObstaclesCheckFrequency = obstaclesCheckFrequency;
32+
action.MinimumRandomDirection = minimumRandomDirection;
33+
action.MaximumRandomDirection = maximumRandomDirection;
34+
action.Avoid180 = avoid180;
35+
return action;
36+
}
37+
}
38+
}

Common/Scripts/AI/Graph/Actions/AIActionMoveRandomlyGridNode.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using MoreMountains.TopDownEngine;
2+
using MoreMountains.Tools;
3+
using TheBitCave.MMToolsExtensions.AI.Graph;
4+
using UnityEngine;
5+
6+
namespace TheBitCave.TopDownEngineExensions.AI.Graph
7+
{
8+
/// <summary>
9+
/// A node representing a TopDown Engine <see cref="MoreMountains.TopDownEngine.AIActionRotateConeOfVision2D"/> action.
10+
/// </summary>
11+
[CreateNodeMenu("AI/Action/2D/Rotate Cone of Vision")]
12+
public class AIActionRotateConeOfVision2DNode : AIActionNode
13+
{
14+
public AIActionRotateConeOfVision2D.Modes mode = AIActionRotateConeOfVision2D.Modes.Movement;
15+
16+
public bool interpolate = false;
17+
public float interpolateRate = 5f;
18+
19+
public override AIAction AddActionComponent(GameObject go)
20+
{
21+
var action = go.AddComponent<AIActionRotateConeOfVision2D>();
22+
action.Label = label;
23+
action.Mode = mode;
24+
action.Interpolate = interpolate;
25+
action.InterpolateRate = interpolateRate;
26+
return action;
27+
}
28+
}
29+
}

Common/Scripts/AI/Graph/Actions/AIActionRotateConeOfVision2DNode.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using MoreMountains.TopDownEngine;
2+
using MoreMountains.Tools;
3+
using TheBitCave.MMToolsExtensions.AI.Graph;
4+
using UnityEngine;
5+
6+
namespace TheBitCave.TopDownEngineExensions.AI.Graph
7+
{
8+
/// <summary>
9+
/// A node representing a TopDown Engine <see cref="MoreMountains.TopDownEngine.AIActionRotateTowardsTarget3D"/> action.
10+
/// </summary>
11+
[CreateNodeMenu("AI/Action/3D/Rotate Towards Target")]
12+
public class AIActionRotateTowardsTarget3DNode : AIActionNode
13+
{
14+
public bool lockRotationX = false;
15+
16+
public override AIAction AddActionComponent(GameObject go)
17+
{
18+
var action = go.AddComponent<AIActionRotateTowardsTarget3D>();
19+
action.Label = label;
20+
action.LockRotationX = lockRotationX;
21+
return action;
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)