MAGE  v0.171.0
Matthias Advanced Game Engine
mage::script::RotationScript Class Reference

#include <rotation_script.hpp>

Inheritance diagram for mage::script::RotationScript:
mage::BehaviorScript mage::Component

Public Types

enum  RotationAxis : U8 { RotationAxis::X = 0, RotationAxis::Y = 1, RotationAxis::Z = 2 }
 

Public Member Functions

 RotationScript ()
 
 RotationScript (const RotationScript &script) noexcept
 
 RotationScript (RotationScript &&script) noexcept
 
virtual ~RotationScript ()
 
RotationScriptoperator= (const RotationScript &script) noexcept
 
RotationScriptoperator= (RotationScript &&script) noexcept
 
virtual void Load ([[maybe_unused]] Engine &engine) override
 
virtual void Update ([[maybe_unused]] Engine &engine) override
 
RotationAxis GetRotationAxis () const noexcept
 
void SetRotationAxis (RotationAxis axis) noexcept
 
- Public Member Functions inherited from mage::BehaviorScript
virtual ~BehaviorScript ()
 
BehaviorScriptoperator= (const BehaviorScript &script) noexcept
 
BehaviorScriptoperator= (BehaviorScript &&script) noexcept
 
virtual void FixedUpdate ([[maybe_unused]] Engine &engine)
 
virtual void Close ([[maybe_unused]] Engine &engine)
 
- Public Member Functions inherited from mage::Component
virtual ~Component ()
 
Componentoperator= (const Component &component) noexcept
 
Componentoperator= (Component &&component) noexcept
 
State GetState () const noexcept
 
void SetState (State state) noexcept
 
U64 GetGuid () const noexcept
 
bool HasOwner () const noexcept
 
ProxyPtr< NodeGetOwner () noexcept
 
ProxyPtr< const NodeGetOwner () const noexcept
 

Private Attributes

RotationAxis m_axis
 

Additional Inherited Members

- Protected Member Functions inherited from mage::BehaviorScript
 BehaviorScript () noexcept
 
 BehaviorScript (const BehaviorScript &script) noexcept
 
 BehaviorScript (BehaviorScript &&script) noexcept
 
- Protected Member Functions inherited from mage::Component
 Component () noexcept
 
 Component (const Component &component) noexcept
 
 Component (Component &&component) noexcept
 

Member Enumeration Documentation

◆ RotationAxis

Enumerator

Constructor & Destructor Documentation

◆ RotationScript() [1/3]

mage::script::RotationScript::RotationScript ( )

◆ RotationScript() [2/3]

mage::script::RotationScript::RotationScript ( const RotationScript script)
defaultnoexcept

◆ RotationScript() [3/3]

mage::script::RotationScript::RotationScript ( RotationScript &&  script)
defaultnoexcept

◆ ~RotationScript()

mage::script::RotationScript::~RotationScript ( )
virtualdefault

Member Function Documentation

◆ GetRotationAxis()

RotationAxis mage::script::RotationScript::GetRotationAxis ( ) const
noexcept

◆ Load()

void mage::script::RotationScript::Load ( [[maybe_unused] ] Engine engine)
overridevirtual

Loads this behavior script. Allows this behavior script to preform any pre-processing.

Parameters
[in,out]engineA reference to the engine.
Exceptions
ExceptionFailed to load this behavior script.

Reimplemented from mage::BehaviorScript.

◆ operator=() [1/2]

RotationScript & mage::script::RotationScript::operator= ( const RotationScript script)
defaultnoexcept

◆ operator=() [2/2]

RotationScript & mage::script::RotationScript::operator= ( RotationScript &&  script)
defaultnoexcept

◆ SetRotationAxis()

void mage::script::RotationScript::SetRotationAxis ( RotationAxis  axis)
noexcept

◆ Update()

void mage::script::RotationScript::Update ( [[maybe_unused] ] Engine engine)
overridevirtual

Updates this behavior script.

This method is called once per frame.

Parameters
[in,out]engineA reference to the engine.
Exceptions
ExceptionFailed to update this behavior script.

Reimplemented from mage::BehaviorScript.

Member Data Documentation

◆ m_axis

RotationAxis mage::script::RotationScript::m_axis
private