1
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BITFALL.Player.Movement;
|
||||
using BITFALL.Props;
|
||||
using BITKit;
|
||||
using BITKit.Entities;
|
||||
using BITKit.Sensors;
|
||||
@@ -9,9 +11,11 @@ using UnityEngine;
|
||||
|
||||
namespace BITFALL.AI
|
||||
{
|
||||
public class AIBehavour : EntityBehavior
|
||||
public class AIBehavour : EntityBehavior,IStunObject
|
||||
{
|
||||
[SerializeReference,SubclassSelector] private ISensor sensor;
|
||||
|
||||
[SerializeReference, SubclassSelector] private IReference stunAnimation;
|
||||
|
||||
private readonly Optional<IEntityMovement> grabTarget=new();
|
||||
|
||||
@@ -62,6 +66,14 @@ namespace BITFALL.AI
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public float Weight { get; set; }
|
||||
public event Action<float> OnWeightChanged;
|
||||
public void Stun(float distance, float duration)
|
||||
{
|
||||
if (stunAnimation is null) return;
|
||||
UnityEntity.Invoke(Constant.Animation.Play,stunAnimation.Value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user