/// <summary>Adiciona camadas traseiras a cena.</summary>
 /// <param name="entities">Lista de camadas a serem adicionada.</param>
 public void AddBackLayer(params ScreenLayer[] backlayers)
 {
     foreach (var e in backlayers)
     {
         BackLayers.Add(e);
     }
 }
Beispiel #2
0
    void GenerateBackLayer()
    {
        Vector3 backLayerPosition = new Vector3(
            transform.position.x + (Constants.PARALLAX_BACKGROUD_WIDTH * BackLayers.Count),
            0.8f, transform.position.z);
        ParallaxLayerBehaviour backLayer = Instantiate(BackLayersGO, backLayerPosition, Quaternion.identity);

        BackLayers.Add(backLayer);
        backLayer.transform.SetParent(transform, true);
    }