Show / Hide Table of Contents

Class MyCasterComponent

Component used for finding object by casting. It is possible to create this component with different types of casting: Box, Raycast, Shape

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyCasterComponent
Inherited Members
MyEntityComponentBase.Container
MyEntityComponentBase.Entity
MyEntityComponentBase.AttachSyncToEntity
MyEntityComponentBase.OnAfterAddedToContainer
MyEntityComponentBase.BeforeRemovedFromContainer
MyComponentBase.SetContainer(IMyComponentContainer)
MyComponentBase.GetAs<T>()
MyComponentBase.OnAddedToScene()
MyComponentBase.OnRemovedFromScene()
MyComponentBase.Serialize(Boolean)
MyComponentBase.Deserialize(MyObjectBuilder_ComponentBase)
MyComponentBase.IsSerialized()
MyComponentBase.RemoveExistingComponentOnNewInsert
MyComponentBase.ContainerBase
Namespace: Sandbox.Game.EntityComponents
Assembly: Sandbox.Game.dll
Syntax
public class MyCasterComponent : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase

Constructors

MyCasterComponent(MyDrillSensorBase)

Declaration
public MyCasterComponent(MyDrillSensorBase caster)
Parameters
Type Name Description
Sandbox.Game.Weapons.Guns.MyDrillSensorBase caster

Properties

Caster

Declaration
public MyDrillSensorBase Caster { get; }
Property Value
Type Description
Sandbox.Game.Weapons.Guns.MyDrillSensorBase

ComponentTypeDebugString

Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type Description
System.String
Overrides
MyEntityComponentBase.ComponentTypeDebugString

DistanceToHitSq

Declaration
public double DistanceToHitSq { get; }
Property Value
Type Description
System.Double

EnvironmentItem

Declaration
public int EnvironmentItem { get; }
Property Value
Type Description
System.Int32

HitBlock

Gets block that is hit by a raycaster.

Declaration
public MySlimBlock HitBlock { get; }
Property Value
Type Description
Sandbox.Game.Entities.Cube.MySlimBlock

HitCharacter

Declaration
public MyCharacter HitCharacter { get; }
Property Value
Type Description
Sandbox.Game.Entities.Character.MyCharacter

HitCubeGrid

Declaration
public MyCubeGrid HitCubeGrid { get; }
Property Value
Type Description
MyCubeGrid

HitDestroyableObj

Declaration
public IMyDestroyableObject HitDestroyableObj { get; }
Property Value
Type Description
IMyDestroyableObject

HitEnvironmentSector

Declaration
public MyEnvironmentSector HitEnvironmentSector { get; }
Property Value
Type Description
MyEnvironmentSector

HitFloatingObject

Declaration
public MyFloatingObject HitFloatingObject { get; }
Property Value
Type Description
MyFloatingObject

HitPosition

Declaration
public Vector3D HitPosition { get; }
Property Value
Type Description
Vector3D

PointOfReference

Declaration
public Vector3D PointOfReference { get; }
Property Value
Type Description
Vector3D

Methods

GetCastLength()

Declaration
public float GetCastLength()
Returns
Type Description
System.Single

Init(MyComponentDefinitionBase)

Declaration
public override void Init(MyComponentDefinitionBase definition)
Parameters
Type Name Description
MyComponentDefinitionBase definition
Overrides
MyComponentBase.Init(MyComponentDefinitionBase)

OnAddedToContainer()

Declaration
public override void OnAddedToContainer()
Overrides
MyEntityComponentBase.OnAddedToContainer()

OnBeforeRemovedFromContainer()

Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
MyEntityComponentBase.OnBeforeRemovedFromContainer()

OnWorldPosChanged(ref MatrixD)

Declaration
public void OnWorldPosChanged(ref MatrixD newTransform)
Parameters
Type Name Description
MatrixD newTransform

SetPointOfReference(Vector3D)

Declaration
public void SetPointOfReference(Vector3D pointOfRef)
Parameters
Type Name Description
Vector3D pointOfRef

Extension Methods

MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.UnregisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash)
MyEntityContainerEventExtensions.RaiseEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventParams)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾