private void HandleGridInit(GridInitializeEvent ev) { var guid = ev.EntityUid; if (!EntityManager.TryGetEntity(guid, out var gridEntity)) { return; } var collideComp = gridEntity.EnsureComponent <PhysicsComponent>(); collideComp.CanCollide = true; collideComp.BodyType = BodyType.Static; }
private void HandleGridInitialize(GridInitializeEvent ev) { var gridEnt = EntityManager.GetEntity(ev.EntityUid); gridEnt.EnsureComponent <GravityComponent>(); }
private void HandleGridInitialize(GridInitializeEvent ev) { EntityManager.EnsureComponent <GravityComponent>(ev.EntityUid); }
private void OnGridInit(GridInitializeEvent ev) { EntityManager.EnsureComponent <ShuttleComponent>(ev.EntityUid); }
private void HandleGridInit(GridInitializeEvent ev) { EntityManager.GetEntity(ev.EntityUid).EnsureComponent <ShuttleComponent>(); }