public void SetupSensor() { if (Space == null) { return; } Space.AddCollider(true); Sensor = Space.gameObject.AddComponent <SpawnSpaceSensor>(); Sensor.Init(vessel); }
public void Add(Entity entity, Layer layer) { Entities.Add(entity); entity.Scene = this; layer.Add(entity); entity.Layer = layer; Space.AddEntity(entity); foreach (var col in entity.Colliders) { Space.AddCollider(col); } if (Mononoke.Ecs.IsReady) { Mononoke.Ecs.Current.AddEntity(entity); } }