41 lines
924 B
C#
41 lines
924 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Animancer;
|
|
using BITFALL.AI.Zombie.States;
|
|
using BITFALL.Player.Movement;
|
|
using BITKit;
|
|
using BITKit.AI.States;
|
|
using BITKit.Entities;
|
|
using BITKit.StateMachine;
|
|
using Cysharp.Threading.Tasks;
|
|
using UnityEngine;
|
|
using Random = UnityEngine.Random;
|
|
|
|
namespace BITFALL.AI
|
|
{
|
|
[CustomType(typeof(AIZombie))]
|
|
[CustomType(typeof(AIAgent))]
|
|
public class AIZombie : StateBasedBehavior<AIZombieState>, AIAgent
|
|
{
|
|
[SerializeField] internal AnimancerComponent animancerComponent;
|
|
|
|
[Inject] internal AIService service;
|
|
[Inject] internal IEntityOverride entityOverride;
|
|
[Inject] internal IHealth health;
|
|
internal readonly ValidHandle lockHandle = new();
|
|
|
|
public override void OnStart()
|
|
{
|
|
base.OnStart();
|
|
TransitionState<Idle>();
|
|
service.RegisterTick(OnTick);
|
|
}
|
|
private void OnTick(float obj)
|
|
{
|
|
UpdateState(obj);
|
|
}
|
|
}
|
|
|
|
}
|