Show / Hide Table of Contents

Class EnemyMotor

Enemy motor and AI combat decision-making logic.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
EnemyMotor
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
[RequireComponent(typeof(EnemySenses))]
[RequireComponent(typeof(EnemyAttack))]
[RequireComponent(typeof(EnemyBlood))]
[RequireComponent(typeof(EnemySounds))]
[RequireComponent(typeof(CharacterController))]
public class EnemyMotor : MonoBehaviour

Fields

| Improve this Doc View Source

OpenDoorDistance

Declaration
public float OpenDoorDistance
Field Value
Type Description
Single

Properties

| Improve this Doc View Source

Bashing

Declaration
public bool Bashing { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

GiveUpTimer

Declaration
public int GiveUpTimer { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

IsHostile

Declaration
public bool IsHostile { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsLevitating

Declaration
public bool IsLevitating { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

KnockbackDirection

Declaration
public Vector3 KnockbackDirection { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

KnockbackSpeed

Declaration
public float KnockbackSpeed { get; set; }
Property Value
Type Description
Single

Methods

| Improve this Doc View Source

AdjustLastGrounded(Single)

Call this when floating origin ticks on Y to ensure enemy doesn't die from large "grounded" difference

Declaration
public void AdjustLastGrounded(float y)
Parameters
Type Name Description
Single y

Amount to increment to fallstart

| Improve this Doc View Source

FindGroundPosition(Single)

Attempts to find the ground position below enemy, even if player is flying/falling

Declaration
public Vector3 FindGroundPosition(float distance = 16F)
Parameters
Type Name Description
Single distance

Distance to fire ray.

Returns
Type Description
Vector3

Hit point on surface below enemy, or enemy position if hit not found in distance.

| Improve this Doc View Source

MakeEnemyHostileToAttacker(DaggerfallEntityBehaviour)

Immediately become hostile towards attacker and know attacker's location.

Declaration
public void MakeEnemyHostileToAttacker(DaggerfallEntityBehaviour attacker)
Parameters
Type Name Description
DaggerfallEntityBehaviour attacker

Attacker to become hostile towards

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX