Class BuildableBarricade
- Namespace
- Uncreated.Warfare.Buildables
- Assembly
- Uncreated.Warfare.dll
[CannotApplyEqualityOperator]
public class BuildableBarricade : IBuildable, IEquatable<IBuildable>, IEquatable<BuildableBarricade>, IEquatable<BarricadeDrop>, IEquatable<BarricadeData>, IEquatable<BuildableStructure>, IEquatable<StructureDrop>, IEquatable<StructureData>, ITransformObject
- Inheritance
-
BuildableBarricade
- Implements
-
IEquatable<BarricadeDrop>IEquatable<BarricadeData>IEquatable<StructureDrop>IEquatable<StructureData>
- Inherited Members
- Extension Methods
Constructors
BuildableBarricade(BarricadeDrop)
public BuildableBarricade(BarricadeDrop drop)
Parameters
dropBarricadeDrop
Properties
Alive
If this object is still alive.
public bool Alive { get; }
Property Value
Asset
The asset for the buildable.
public ItemPlaceableAsset Asset { get; }
Property Value
- ItemPlaceableAsset
Data
public BarricadeData Data { get; }
Property Value
- BarricadeData
Drop
public BarricadeDrop Drop { get; }
Property Value
- BarricadeDrop
Group
The group of the player that placed the buildable.
public CSteamID Group { get; }
Property Value
- CSteamID
Health
The health of this buildable.
public ushort Health { get; }
Property Value
InstanceId
The instance ID of this buildable specific to it's buildable type.
public uint InstanceId { get; }
Property Value
IsDead
If the buildable has been destroyed by its health dropping to 0.
public bool IsDead { get; }
Property Value
Remarks
This is not the same as not spawned.
IsOnVehicle
If the buildable is planted on a vehicle.
public bool IsOnVehicle { get; }
Property Value
IsStructure
If the buildable is a structure instead of a barricade.
public bool IsStructure { get; }
Property Value
MaxHealth
The maximum amount of health this buildable could have.
public ushort MaxHealth { get; }
Property Value
Model
The transform of the buildable.
public Transform Model { get; }
Property Value
- Transform
NetId
The ID used to refer to networked objects.
public NetId NetId { get; }
Property Value
- NetId
Owner
The player that placed the buildable.
public CSteamID Owner { get; }
Property Value
- CSteamID
Position
The world position of the object.
public Vector3 Position { get; set; }
Property Value
- Vector3
Exceptions
- GameThreadException
Not on main thread.
- NotSupportedException
Not able to set position.
Rotation
The world rotation of the object.
public Quaternion Rotation { get; set; }
Property Value
- Quaternion
Exceptions
- GameThreadException
Not on main thread.
- NotSupportedException
Not able to set rotation.
VehicleParent
The vehicle this barricade is attached to, if any.
public InteractableVehicle? VehicleParent { get; }
Property Value
- InteractableVehicle
Methods
Equals(BarricadeData?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(BarricadeData? other)
Parameters
otherBarricadeDataAn object to compare with this object.
Returns
Equals(BarricadeDrop?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(BarricadeDrop? other)
Parameters
otherBarricadeDropAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(BuildableBarricade?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(BuildableBarricade? other)
Parameters
otherBuildableBarricadeAn object to compare with this object.
Returns
Equals(IBuildable?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(IBuildable? other)
Parameters
otherIBuildableAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
SetPositionAndRotation(Vector3, Quaternion)
Set the position and rotation at the same time.
public void SetPositionAndRotation(Vector3 position, Quaternion rotation)
Parameters
positionVector3rotationQuaternion
Exceptions
- GameThreadException
Not on main thread.
- NotSupportedException
Not able to set position or rotation.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.