mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 22:27:58 +01:00
24 lines
840 B
C#
24 lines
840 B
C#
using UnityEngine;
|
|
|
|
namespace Fie.AI
|
|
{
|
|
public class FieAITaskChangelingIdle : FieAITaskBase
|
|
{
|
|
public override bool Task(FieAITaskController manager)
|
|
{
|
|
if (manager.ownerCharacter.detector.lockonTargetObject == null)
|
|
{
|
|
return false;
|
|
}
|
|
FieAITaskController.FieAIFrontAndBackPoint frontAndBackPoint = manager.GetFrontAndBackPoint();
|
|
if (frontAndBackPoint.backDistance > 0f)
|
|
{
|
|
nextStateWeightList[typeof(FieAITaskEnemiesHoovesRacesEvadeBackWall)] = 100;
|
|
return true;
|
|
}
|
|
nextStateWeightList[typeof(FieAITaskChangelingMelee)] = (int)Mathf.Max(1000f * manager.ownerCharacter.healthStats.nowHelthAndShieldRatePerMax, 400f);
|
|
nextStateWeightList[typeof(FieAITaskChangelingShoot)] = (int)Mathf.Max(1000f * (1f - manager.ownerCharacter.healthStats.nowHelthAndShieldRatePerMax), 400f);
|
|
return true;
|
|
}
|
|
}
|
|
}
|