Initial Commit

This commit is contained in:
Simeon Radivoev 2022-02-12 12:53:50 +02:00
commit ee5c2f922d
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
2255 changed files with 547750 additions and 0 deletions

View file

@ -0,0 +1,45 @@
using Unity.Collections;
using Unity.Jobs;
using UnityEngine;
namespace DefaultNamespace.Navigation
{
public class NavigationAgent
{
[SerializeField] private Rigidbody2D agent;
[SerializeField] private Collider2D agentCollider;
[SerializeField] private NavigationBuilder builder;
private ContactPoint2D[] contactPoints = new ContactPoint2D[8];
private int currentIndex = 0;
private float currentTime;
[SerializeField] private Transform goal;
private int groundMask;
[SerializeField] private float jumpSpeed = 1;
private int lastGoalPosIndex = -1;
private NativeList<PathNode> path;
private FindPathJob? pathCalculationJob;
private JobHandle pathCalculationJobHandle;
[SerializeField] private float speed = 1;
[SerializeField] private Transform start;
private Vector2 startPos;
private void Start()
{
groundMask = LayerMask.GetMask("Ground");
path = new NativeList<PathNode>(Allocator.Persistent);
}
private void OnDestroy()
{
path.Dispose();
}
private void Update()
{
}
private void OnDrawGizmos()
{
}
}
}