1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! A set of useful scripts that can be used to in your game.

use crate::camera::FlyingCameraController;
use fyrox::script::constructor::ScriptConstructorContainer;

pub mod camera;

/// Registers every script from the crate in the given constructor container. Use it, if you want to register all
/// available scripts at once. Typical usage could be like this:
///
/// ```rust
/// # use fyrox::{
/// #     core::pool::Handle, core::visitor::prelude::*, core::reflect::prelude::*,
/// #     plugin::{Plugin, PluginContext, PluginRegistrationContext},
/// #     scene::Scene,
/// # };
/// #
/// # #[derive(Visit, Reflect, Debug)]
/// # struct Game;
/// #
/// # impl Plugin for Game {
///   // This is PluginConstructor::register method of your GameConstructor.
///   fn register(&self, context: PluginRegistrationContext) {
///       fyrox_scripts::register(&context.serialization_context.script_constructors)
///   }
/// # }
/// ```
pub fn register(container: &ScriptConstructorContainer) {
    container.add::<FlyingCameraController>("Fyrox Flying Camera Controller");
}