Class MyDoorBase
GR: Added this class to be used as a base for all door classes. Added only very basic functionallity no new definitions or object builders. The main issue was that door actions (open / close) couldn't be used in groups because they were not inheriting from same class. Instead were inheriting directly from MyFunctionalBlock so this class is used in between for common attributes.
Inheritance
System.Object
Sandbox.Game.Entities.Cube.MySyncedBlock
Sandbox.Game.Entities.Cube.MyTerminalBlock
Sandbox.Game.Entities.Cube.MyFunctionalBlock
MyDoorBase
Implements
Inherited Members
Namespace: Sandbox.Game.Entities
Assembly: Sandbox.Game.dll
Syntax
[MyCubeBlockType]
public abstract class MyDoorBase : MyFunctionalBlock, IMyComponentOwner<MyIDModule>, IMyUpgradableBlock, IMyUpgradableBlock, IMyEventProxy, IMyEventOwner, IMySyncedEntity, IMyTieredUpdateBlock, IMyUpdateTimer, IMyTextSurfaceProvider, IMyMultiTextPanelComponentOwner, IMyTextPanelComponentOwner, IMyFunctionalBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyTerminalBlock, IMyCubeBlock, IMyCubeBlock, IMyEntity, IMyEntity
Constructors
MyDoorBase()
Declaration
public MyDoorBase()
Properties
AnyoneCanUse
Declaration
public bool AnyoneCanUse { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HighlightMode
Declaration
public override MyCubeBlockHighlightModes HighlightMode { get; }
Property Value
Type | Description |
---|---|
MyCubeBlockHighlightModes |
Overrides
Open
Declaration
public bool Open { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ContactCallbackInternal()
Declaration
public virtual void ContactCallbackInternal()
CreateSubpartConstraint(MyEntity, out HkFixedConstraintData, out HkConstraint)
Declaration
protected void CreateSubpartConstraint(MyEntity subpart, out HkFixedConstraintData constraintData, out HkConstraint constraint)
Parameters
Type | Name | Description |
---|---|---|
MyEntity | subpart | |
Havok.HkFixedConstraintData | constraintData | |
Havok.HkConstraint | constraint |
CreateTerminalControls()
Declaration
protected override void CreateTerminalControls()
Overrides
Sandbox.Game.Entities.Cube.MyFunctionalBlock.CreateTerminalControls()
DisposeSubpartConstraint(ref HkConstraint, ref HkFixedConstraintData)
Declaration
protected void DisposeSubpartConstraint(ref HkConstraint constraint, ref HkFixedConstraintData constraintData)
Parameters
Type | Name | Description |
---|---|---|
Havok.HkConstraint | constraint | |
Havok.HkFixedConstraintData | constraintData |
EnableContactCallbacks()
Declaration
public virtual bool EnableContactCallbacks()
Returns
Type | Description |
---|---|
System.Boolean |
GetObjectBuilderCubeBlock(Boolean)
Declaration
public override MyObjectBuilder_CubeBlock GetObjectBuilderCubeBlock(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy |
Returns
Type | Description |
---|---|
MyObjectBuilder_CubeBlock |
Overrides
Sandbox.Game.Entities.Cube.MyFunctionalBlock.GetObjectBuilderCubeBlock(System.Boolean)
Init(MyObjectBuilder_CubeBlock, MyCubeGrid)
Declaration
public override void Init(MyObjectBuilder_CubeBlock objectBuilder, MyCubeGrid cubeGrid)
Parameters
Type | Name | Description |
---|---|---|
MyObjectBuilder_CubeBlock | objectBuilder | |
MyCubeGrid | cubeGrid |
Overrides
Sandbox.Game.Entities.Cube.MyFunctionalBlock.Init(VRage.Game.MyObjectBuilder_CubeBlock, Sandbox.Game.Entities.MyCubeGrid)
IsClosing()
Declaration
public abstract bool IsClosing()
Returns
Type | Description |
---|---|
System.Boolean |
OnOpenChanged(SyncBase)
Declaration
protected virtual void OnOpenChanged(SyncBase obj)
Parameters
Type | Name | Description |
---|---|---|
VRage.Sync.SyncBase | obj |
SetOpenLocalValue(Boolean)
Declaration
protected void SetOpenLocalValue(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value |
SetOpenRequest(Boolean, Int64)
Declaration
public void SetOpenRequest(bool open, long identityId)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | open | |
System.Int64 | identityId |
SetupDoorSubpart(MyEntitySubpart, Int32, Boolean)
Declaration
protected static void SetupDoorSubpart(MyEntitySubpart subpart, int havokCollisionSystemID, bool refreshInPlace)
Parameters
Type | Name | Description |
---|---|---|
MyEntitySubpart | subpart | |
System.Int32 | havokCollisionSystemID | |
System.Boolean | refreshInPlace |
Events
OpenChanged
Declaration
public event Action<MyDoorBase> OpenChanged
Event Type
Type | Description |
---|---|
System.Action<MyDoorBase> |