Class BuildableStructure
- Namespace
- Uncreated.Warfare.Buildables
- Assembly
- Uncreated.Warfare.dll
[CannotApplyEqualityOperator]
public class BuildableStructure : IBuildable, IEquatable<IBuildable>, IEquatable<BuildableBarricade>, IEquatable<BarricadeDrop>, IEquatable<BarricadeData>, IEquatable<BuildableStructure>, IEquatable<StructureDrop>, IEquatable<StructureData>, ITransformObject
- Inheritance
-
BuildableStructure
- Implements
-
IEquatable<BarricadeDrop>IEquatable<BarricadeData>IEquatable<StructureDrop>IEquatable<StructureData>
- Inherited Members
- Extension Methods
Constructors
BuildableStructure(StructureDrop)
public BuildableStructure(StructureDrop drop)
Parameters
dropStructureDrop
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 StructureData Data { get; }
Property Value
- StructureData
Drop
public StructureDrop Drop { get; }
Property Value
- StructureDrop
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.
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.
Structure
public Structure Structure { get; }
Property Value
- Structure
Methods
Equals(StructureData?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(StructureData? other)
Parameters
otherStructureDataAn object to compare with this object.
Returns
Equals(StructureDrop?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(StructureDrop? other)
Parameters
otherStructureDropAn 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(BuildableStructure?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(BuildableStructure? other)
Parameters
otherBuildableStructureAn 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.