Show / Hide Table of Contents

Class MyEntityGameLogic

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyGameLogicComponent
MyEntityGameLogic
MyMeteor.MyMeteorGameLogic
Inherited Members
MyGameLogicComponent.EntityUpdate
MyGameLogicComponent.NeedsUpdate
MyGameLogicComponent.Closed
MyGameLogicComponent.MarkedForClose
MyGameLogicComponent.ComponentTypeDebugString
MyGameLogicComponent.ModContext
MyEntityComponentBase.OnBeforeRemovedFromContainer()
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.Init(MyComponentDefinitionBase)
MyComponentBase.IsSerialized()
MyComponentBase.RemoveExistingComponentOnNewInsert
MyComponentBase.ContainerBase
Namespace: Sandbox.Game.Components
Assembly: Sandbox.Game.dll
Syntax
public class MyEntityGameLogic : MyGameLogicComponent, IMyEntityComponentBase, IMyComponentBase, IMyGameLogicComponent

Constructors

MyEntityGameLogic()

Declaration
public MyEntityGameLogic()

Fields

m_entity

Declaration
protected MyEntity m_entity
Field Value
Type Description
MyEntity

Properties

GameLogic

Declaration
public MyGameLogicComponent GameLogic { get; set; }
Property Value
Type Description
MyGameLogicComponent

Methods

CallAndClearOnClose()

Declaration
protected void CallAndClearOnClose()

CallAndClearOnClosing()

Declaration
protected void CallAndClearOnClosing()

Close()

Declaration
public override void Close()
Overrides
MyGameLogicComponent.Close()

GetObjectBuilder(Boolean)

Declaration
public override MyObjectBuilder_EntityBase GetObjectBuilder(bool copy = false)
Parameters
Type Name Description
System.Boolean copy
Returns
Type Description
MyObjectBuilder_EntityBase
Overrides
MyGameLogicComponent.GetObjectBuilder(Boolean)

Init(StringBuilder, String, MyEntity, Nullable<Single>, String)

Declaration
public void Init(StringBuilder displayName, string model, MyEntity parentObject, Nullable<float> scale, string modelCollision = null)
Parameters
Type Name Description
System.Text.StringBuilder displayName
System.String model
MyEntity parentObject
System.Nullable<System.Single> scale
System.String modelCollision

Init(MyObjectBuilder_EntityBase)

Declaration
public override void Init(MyObjectBuilder_EntityBase objectBuilder)
Parameters
Type Name Description
MyObjectBuilder_EntityBase objectBuilder
Overrides
MyGameLogicComponent.Init(MyObjectBuilder_EntityBase)

MarkForClose()

This method marks this entity for close which means, that Close will be called after all entities are updated

Declaration
public override void MarkForClose()
Overrides
MyGameLogicComponent.MarkForClose()

OnAddedToContainer()

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

UpdateAfterSimulation()

Declaration
public override void UpdateAfterSimulation()
Overrides
MyGameLogicComponent.UpdateAfterSimulation()

UpdateAfterSimulation10()

Declaration
public override void UpdateAfterSimulation10()
Overrides
MyGameLogicComponent.UpdateAfterSimulation10()

UpdateAfterSimulation100()

Declaration
public override void UpdateAfterSimulation100()
Overrides
MyGameLogicComponent.UpdateAfterSimulation100()

UpdateBeforeSimulation()

Declaration
public override void UpdateBeforeSimulation()
Overrides
MyGameLogicComponent.UpdateBeforeSimulation()

UpdateBeforeSimulation10()

Called each 10th frame if registered for update10

Declaration
public override void UpdateBeforeSimulation10()
Overrides
MyGameLogicComponent.UpdateBeforeSimulation10()

UpdateBeforeSimulation100()

Called each 100th frame if registered for update100

Declaration
public override void UpdateBeforeSimulation100()
Overrides
MyGameLogicComponent.UpdateBeforeSimulation100()

UpdateOnceBeforeFrame()

Declaration
public override void UpdateOnceBeforeFrame()
Overrides
MyGameLogicComponent.UpdateOnceBeforeFrame()

UpdatingStopped()

Declaration
public override void UpdatingStopped()
Overrides
MyGameLogicComponent.UpdatingStopped()

Events

OnClose

Declaration
public event Action<MyEntity> OnClose
Event Type
Type Description
System.Action<MyEntity>

OnClosing

Declaration
public event Action<MyEntity> OnClosing
Event Type
Type Description
System.Action<MyEntity>

OnMarkForClose

This event may not be invoked at all, when calling MyEntities.CloseAll, marking is bypassed

Declaration
public event Action<MyEntity> OnMarkForClose
Event Type
Type Description
System.Action<MyEntity>

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
☀
☾