Class ExplosionComponent
Base explosion component that allows block manipulation in areas.
Has basic logic and derived components can implement block processor of any kind. Ex block removal/replacement, etc
Inheritance
System.Object
ExplosionComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class ExplosionComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IHasEnvVars
Constructors
ExplosionComponent()
Declaration
public ExplosionComponent()
Properties
CanBeUsedManually
Declaration
[EnvVar]
public bool CanBeUsedManually { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Config
Declaration
public ExplosionConfig Config { get; }
Property Value
CrushedBlockTypes
Declaration
public static List<Type> CrushedBlockTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<System.Type> |
|
ExplosionBlockMap
Declaration
public static Dictionary<Type, Type> ExplosionBlockMap { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Type, System.Type> |
|
Methods
GenerateExplosionBlockMap()
Declaration
public static void GenerateExplosionBlockMap()
GetExplosionArea()
Determines area for explosion, in case any custom shape needed - override this.
Declaration
protected virtual IEnumerable<Vector3i> GetExplosionArea()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vector3i> |
|
Initialize(ExplosionConfig, Boolean)
Declaration
public void Initialize(ExplosionConfig config, bool canUseManually = true)
Parameters
LightUp(Player, InteractionTriggerInfo, InteractionTarget)
Declaration
[Interaction]
public void LightUp(Player player, InteractionTriggerInfo triggerInfo, InteractionTarget target)
Parameters
ProcessExplosion(IEnumerable<Vector3i>)
Determines what will happen with block positions after explosion event from server
This is called as post action in atomic actions and passes all valid positions after auth validation, etc.
Declaration
protected virtual void ProcessExplosion(IEnumerable<Vector3i> area)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Vector3i> |
area |
|
StartFuseTimer(Player)
Declaration
public void StartFuseTimer(Player player)
Parameters
Type |
Name |
Description |
Player |
player |
|
StartFuseTimerCustom(Player, Single, Int32, Boolean)
Allows to start detonation with custom timer and radius. Good to be reused from extra extensions and sources
Declaration
public void StartFuseTimerCustom(Player player, float fuseTime, int radius = -1, bool notify = true)
Parameters
Type |
Name |
Description |
Player |
player |
|
System.Single |
fuseTime |
|
System.Int32 |
radius |
|
System.Boolean |
notify |
|
TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
Declaration
public override InventoryMoveResult TryPickup(Player player, InventoryChangeSet invChanges, Inventory targetInventory, bool force)
Parameters
Returns
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods