Class TypewriterCharacterRevealedEvent
Event published by a typewriter effect each time it reveals a character, so game code can play a keystroke sound without polling the effect.
Inherited Members
ScyllaEvent.IsCancelled
ScyllaEvent.StopPropagation()
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class TypewriterCharacterRevealedEvent : ScyllaEvent
Remarks
Whitespace and line breaks advance the write position without publishing, so a listener does not need to filter them out to avoid a click on every space.
Constructors
TypewriterCharacterRevealedEvent(ITextEffect, uint, CellPosition, int)
Creates a new character-revealed event.
Declaration
public TypewriterCharacterRevealedEvent(ITextEffect effect, uint codepoint, CellPosition position, int characterIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ITextEffect | effect | The effect that revealed the character. |
| uint | codepoint | The Unicode codepoint that was revealed. |
| CellPosition | position | The cell the character was written to. |
| int | characterIndex | Index of the character within the source text. |
Properties
CharacterIndex
Index of the character within the effect's source text.
Declaration
public int CharacterIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
Codepoint
The Unicode codepoint that was revealed.
Declaration
public uint Codepoint { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Effect
The effect that revealed the character.
Declaration
public ITextEffect Effect { get; }
Property Value
| Type | Description |
|---|---|
| ITextEffect |
Position
The cell the character was written to.
Declaration
public CellPosition Position { get; }
Property Value
| Type | Description |
|---|---|
| CellPosition |