public virtual GameObject Build(ISceneContext context) { var obj = StructureBuilderUtils.Build(prefabPath, structure.Transform); obj.layer = LayerMaskForCollisionLayer(collisionLayer, context); return(obj); }
public GameObject Build(ISceneContext context) { var spawner = StructureBuilderUtils.AddGameObjectWithBehaviour<RollingObstacleSpawnerBehaviour>(structure.Transform); spawner.SpawnInterval = structure.SpawnInterval; spawner.ObstacleLifetime = structure.ObstacleLifetime; spawner.ForceMultiplier = structure.ForceMultiplier; spawner.Context = context; return spawner.gameObject; }