Show / Hide Table of Contents

Class ParallaxLayerConfig

The configuration for a parallax layer.

Inheritance
System.Object
ParallaxLayerConfig
Namespace: Content.Client.Parallax.Data
Assembly: Content.Client.dll
Syntax
public sealed class ParallaxLayerConfig : object

Fields

| Improve this Doc View Source

Scrolling

Should the parallax scroll at a specific rate per second.

Declaration
public Vector2 Scrolling
Field Value
Type Description
Vector2
| Improve this Doc View Source

Shader

Declaration
public string? Shader
Field Value
Type Description
System.Nullable<System.String>

Properties

| Improve this Doc View Source

ControlHomePosition

A position relative to the centre of a ParallaxControl that this parallax should be drawn at, in pixels. Used for menus. Note that this is ignored if the parallax layer is tiled - in that event a random pixel offset is used and slowness is applied.

Declaration
public Vector2 ControlHomePosition { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

Scale

A scaling factor for the texture. In the interest of simplifying maths, this is rounded down to integer for ParallaxControl, so be careful.

Declaration
public Vector2 Scale { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

Slowness

Multiplier of parallax shift. A slowness of 0.0f anchors this layer to the world. A slowness of 1.0f anchors this layer to the camera.

Declaration
public float Slowness { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

Texture

The texture source for this layer.

Declaration
public IParallaxTextureSource Texture { get; set; }
Property Value
Type Description
IParallaxTextureSource
| Improve this Doc View Source

Tiled

If true, this layer is tiled as the camera scrolls around. If false, this layer only shows up around it's home position.

Declaration
public bool Tiled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

WorldAdjustPosition

An adjustment performed to the world position of this layer after parallax shifting. Used for in-game. Useful for moving around Slowness = 1.0 objects (which can't otherwise be moved from screen centre).

Declaration
public Vector2 WorldAdjustPosition { get; set; }
Property Value
Type Description
Vector2
| Improve this Doc View Source

WorldHomePosition

The "relative to ParallaxAnchor" starting world position for this layer. Essentially, an unclamped lerp occurs between here and the eye position, with Slowness as the factor. Used for in-game.

Declaration
public Vector2 WorldHomePosition { get; set; }
Property Value
Type Description
Vector2
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾