bevy_talks 0.6.0

A Bevy plugin to write dialogues for your characters to say and do things. The Dialogue System for Bevy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Variables: named game-state values the database defines.

use bevy::prelude::*;
use serde::{Deserialize, Serialize};

use super::field::{Field, FieldValue};

/// A named game-state value and what it starts as.
#[derive(Debug, Clone, PartialEq, Reflect, Serialize, Deserialize)]
pub struct Variable {
    /// Unique name within the database.
    pub name: String,
    /// The value the variable starts with.
    pub initial: FieldValue,
    /// Custom fields.
    #[serde(default)]
    pub fields: Vec<Field>,
}