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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -10,7 +10,8 @@
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:1235ca61e7f433b408ed5a68767e7123",
|
||||
"GUID:508392158bd966c4d9c21e19661a441d",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23"
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:2dbcdde5f5df6a343a36c62f12bd6fae"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
Reference in New Issue
Block a user