Skip to content

Character

namespace Griff.Modules.VisualNovels;
public sealed class Character : Component, IDrawEffect

Someone who appears on a visual novel’s Stage, inside it: on stage while their entity is shown, standing at one of the stage’s positions, looking as their Expression says. Each expression is a picture for their Sprite or a clip their Animation plays. Their name is their Speaker’s (or their entity’s), which the stage’s tags and lines use: “[show Ava left happy]”, “Ava (sad): Oh.” While they speak they’re lit, and the others on stage dimmed.

This is a component: its saved properties are on its component page.

public float Brightness { get; set; }

How lit they are, from 0 to 1: lower while someone else on stage is speaking.

public string? Expression { get; set; }

How they look now, one of Expressions: their sprite shows it as soon as it’s set.

public IReadOnlyList<string> Expressions { get; set; }

How they can look, one per row: a one-word name and a picture for their sprite (“Happy: Characters/ava-happy.png”), or the name of a clip their animation plays (“Laugh: Laugh”).

public float FadeTime { get; set; }

Seconds the fade in or out takes in all (0 for none under way).

public bool IsOnStage { get; }

True while they’re on stage (and not going off).

public bool Leaving { get; set; }

True while they’re going off: they’re hidden once they’ve faded or slid away.

public Vector2 MoveFrom { get; set; }

Where a walk or slide started, from the stage’s middle.

public float MoveLeft { get; set; }

Seconds left of a walk or slide.

public float MoveTime { get; set; }

Seconds the walk or slide takes in all.

public Vector2 MoveTo { get; set; }

Where a walk or slide ends, from the stage’s middle.

public string Name { get; }

Their name: their Speaker’s, or else their entity’s.

public string? Position { get; set; }

Where on the stage they stand, one of its positions: set here, they stand there.

public float Shown { get; set; }

How much of them shows, from 0 (not at all) to 1, as they fade in and out.

public void Hide()

Takes them off, as “[hide Ava]” does.

public void Look(string expression)

Makes them look as expression says, one of their Expressions, e.g. “Happy”.

public void Show()

Brings them on, as “[show Ava]” does: where they were last, or in the middle.

public void Stand(string position)

Stands them at position, one of their stage’s positions, e.g. “Left”.