Interface IMyOffensiveCombatBlock
Describes offensive combat block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyOffensiveCombatBlock : IMyOffensiveCombatBlock, IMyFunctionalBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyTerminalBlock, IMyCubeBlock, IMyCubeBlock, IMyEntity, IMyEntity
Properties
SearchEnemyComponent
Gets SearchEnemyComponent
Declaration
IMySearchEnemyComponent SearchEnemyComponent { get; }
Property Value
Type | Description |
---|---|
IMySearchEnemyComponent |
Methods
DoForceSearchEnemy()
Forces start search enemies task
Declaration
void DoForceSearchEnemy()
DoSearch()
Start search enemies task
Declaration
void DoSearch()
SetSearchLocked(Boolean, Object)
Prevents searching new enemies
Declaration
void SetSearchLocked(bool locked, object by)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | locked | When it is true - scan, provided object would block next scans, use, false, to allow search |
System.Object | by | Object, that blocks search. Can't be null |
TryGetSelectedAttackPattern(out IMyAttackPatternComponent)
Gets current attack pattern
Declaration
bool TryGetSelectedAttackPattern(out IMyAttackPatternComponent attackPatternComponent)
Parameters
Type | Name | Description |
---|---|---|
IMyAttackPatternComponent | attackPatternComponent | Attack pattern component |
Returns
Type | Description |
---|---|
System.Boolean | True if block has active attack pattern |
TryGetSelectedAttackPattern(Int64, out IMyAttackPatternComponent)
Gets attack pattern by pattern Id
Declaration
bool TryGetSelectedAttackPattern(long patternId, out IMyAttackPatternComponent attackPatternComponent)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | patternId | Id of pattern |
IMyAttackPatternComponent | attackPatternComponent | Attack pattern component |
Returns
Type | Description |
---|---|
System.Boolean | True if block has active attack pattern |
Events
OnSelectedAttackPatternChanged
Triggers when current attack pattern has been changed
Declaration
event Action<IMyOffensiveCombatBlock, long> OnSelectedAttackPatternChanged
Event Type
Type | Description |
---|---|
System.Action<IMyOffensiveCombatBlock, System.Int64> |
OnTargetChanged
Triggers when target was changed First entity is old target Second entity is new target Bool - when true, it is called from recent search, when false it is called when entity was destroyed
Declaration
event Action<IMyOffensiveCombatBlock, IMyEntity, IMyEntity, bool> OnTargetChanged
Event Type
Type | Description |
---|---|
System.Action<IMyOffensiveCombatBlock, IMyEntity, IMyEntity, System.Boolean> |