public void RegisterSurface(Surface surface, Entity entity, GameObject go) { var surfaceApi = new SurfaceApi(surface, entity, this); _tableApi.Surfaces[surface.Name] = surfaceApi; _initializables.Add(surfaceApi); _hittables[entity] = surfaceApi; _slingshots[entity] = surfaceApi; }
void IApi.OnInit(BallManager ballManager) { _surfaceApi = _player.TableApi.Surface(_slingshotComponent.SlingshotSurface.MainComponent); if (_surfaceApi != null) { _surfaceApi.Slingshot += OnSlingshot; } Init?.Invoke(this, EventArgs.Empty); }
public SurfaceColliderGenerator(SurfaceApi surfaceApi, SurfaceComponent component, SurfaceColliderComponent colliderComponent) { _api = surfaceApi; _component = component; _colliderComponent = colliderComponent; }