Пример #1
0
    void Awake()
    {
        ParallaxSystem ps = World.Active.GetOrCreateSystem <ParallaxSystem>();

        ps.SetMovementBounds(topBound, bottomBound);
        ps.SetSpawnBounds(leftBound, rightBound);
        foreach (ParallaxLayer layer in layers)
        {
            if (layer.prefab != null)
            {
                ps.AddLayer(layer.prefab, layer.count, layer.minVelocity,
                            layer.maxVelocity, layer.height);
            }
        }
    }
Пример #2
0
 public ParallaxOverlay()
 {
     IoCManager.InjectDependencies(this);
     _parallax = IoCManager.Resolve <IEntitySystemManager>().GetEntitySystem <ParallaxSystem>();
 }