Struct EnvironmentShadowScope
Scope that draw shadows for rendering cells inside
Implements
Examples
using AngeliA;
namespace AngeliaGame;
public class Example {
[OnGameUpdate]
internal static void OnGameUpdate () {
using (new EnvironmentShadowScope()) {
// Rendering cell created inside will have a shadow
Renderer.Draw(BuiltInSprite.ICON_ENTITY, Renderer.CameraRect.Shrink(Const.CEL * 8));
}
}
}
Constructors
EnvironmentShadowScope()
Scope that draw shadows for rendering cells inside
Declaration
public EnvironmentShadowScope()
EnvironmentShadowScope(int, int, byte, int)
Scope that draw shadows for rendering cells inside
Declaration
public EnvironmentShadowScope(int offsetX = -64, int offsetY = 0, byte alpha = 64, int z = -65520)
Parameters
Type | Name | Description |
---|---|---|
int | offsetX | Shadow distance X in global space |
int | offsetY | Shadow distance Y in global space |
byte | alpha | Transparency value of the shadow. (0 means transparent, 255 means not tramsparent) |
int | z | Z value for sort rendering cells |
Fields
Alpha
Transparency value of the shadow. (0 means transparent, 255 means not tramsparent)
Declaration
public readonly byte Alpha
OffsetX
Shadow distance X in global space
Declaration
public readonly int OffsetX
OffsetY
Shadow distance Y in global space
Declaration
public readonly int OffsetY
Z
Z value for sort rendering cells
Declaration
public readonly int Z
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()