Class CartelGoon
Represents a cartel goon (enemy NPC) that can be spawned and controlled.
public class CartelGoon
- Inheritance
-
CartelGoon
- Inherited Members
- Extension Methods
Properties
GameObject
The GameObject associated with this goon.
public GameObject GameObject { get; }
Property Value
- GameObject
IsConscious
Whether this goon is still conscious (alive and not knocked out).
public bool IsConscious { get; }
Property Value
IsSpawned
Whether this goon is currently spawned in the world.
public bool IsSpawned { get; }
Property Value
Position
The current world position of this goon.
public Vector3 Position { get; }
Property Value
- Vector3
Methods
Attack(IEntity)
Makes this goon attack a specific entity.
public void Attack(IEntity target)
Parameters
targetIEntityThe target entity to attack.
AttackPlayer()
Makes this goon attack the local player.
public void AttackPlayer()
Despawn()
Despawns this goon, removing them from the world.
public void Despawn()
SetDefaultWeapon(string?)
Sets or clears the default weapon for this goon. Pass null to make them use fists.
public void SetDefaultWeapon(string? weaponAssetPath)
Parameters
weaponAssetPathstringThe weapon asset path, or null for fists.
WarpTo(Vector3)
Teleports this goon to a specific world position.
public void WarpTo(Vector3 position)
Parameters
positionVector3The target position.