FiE-Game/Assets/Scripts/Fie/AI/FieAITaskTwilightBase.cs

21 lines
775 B
C#
Raw Normal View History

2018-11-20 20:10:49 +01:00
using Fie.Ponies;
using UnityEngine;
2018-11-21 21:16:20 +01:00
namespace Fie.AI {
public abstract class FieAITaskTwilightBase : FieAITaskBase {
protected bool AdjustDirectionByBasicMovement(FieAITaskController manager) {
if (manager.ownerCharacter.detector.lockonTargetObject.flipDirectionVector != manager.ownerCharacter.flipDirectionVector) {
return false;
}
Vector3 vector = manager.ownerCharacter.detector.lockonTargetObject.position - manager.ownerCharacter.transform.position;
vector.y = vector.z;
vector.z = 0;
manager.ownerCharacter.RequestToChangeState<FieStateMachinePoniesGallop>(vector.normalized, 1, FieGameCharacter.StateMachineType.Base);
return true;
}
}
2018-11-20 20:10:49 +01:00
}