Implement enemy spawning and following waypoints

This commit is contained in:
2024-08-12 14:21:11 +02:00
parent 5104b336ca
commit 3f715b2bbc
44 changed files with 1894 additions and 52 deletions

View File

@@ -0,0 +1,27 @@
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Animator))]
public class AnimatorComponent : MonoBehaviour
{
[SerializeField]
[ReadOnly]
private Animator animator;
[SerializeField]
[ReadOnly]
private float velocity;
private void Awake()
{
animator = GetComponent<Animator>();
}
public void UpdateVelocity(float velocity)
{
this.velocity = velocity;
animator.SetFloat("Velocity", velocity);
}
}