mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.
This commit is contained in:
parent
378a933894
commit
acb192e2a5
133 changed files with 1716 additions and 2087 deletions
|
|
@ -425,21 +425,22 @@ static ConsoleDocFragment _lbplayAnimation2(
|
|||
"LightBase",
|
||||
"void playAnimation(LightAnimData anim);"
|
||||
);
|
||||
ConsoleMethod( LightBase, playAnimation, void, 2, 3, "( [LightAnimData anim] )\t"
|
||||
|
||||
DefineConsoleMethod( LightBase, playAnimation, void, (const char * anim), (""), "( [LightAnimData anim] )\t"
|
||||
"Plays a light animation on the light. If no LightAnimData is passed the "
|
||||
"existing one is played."
|
||||
"@hide")
|
||||
{
|
||||
if ( argc == 2 )
|
||||
if ( anim == "" )
|
||||
{
|
||||
object->playAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
LightAnimData *animData;
|
||||
if ( !Sim::findObject( argv[2], animData ) )
|
||||
if ( !Sim::findObject( anim, animData ) )
|
||||
{
|
||||
Con::errorf( "LightBase::playAnimation() - Invalid LightAnimData '%s'.", (const char*)argv[2] );
|
||||
Con::errorf( "LightBase::playAnimation() - Invalid LightAnimData '%s'.", anim );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -469,7 +470,7 @@ void LightBase::playAnimation( LightAnimData *animData )
|
|||
}
|
||||
}
|
||||
|
||||
ConsoleMethod( LightBase, pauseAnimation, void, 2, 2, "Stops the light animation." )
|
||||
DefineConsoleMethod( LightBase, pauseAnimation, void, (), , "Stops the light animation." )
|
||||
{
|
||||
object->pauseAnimation();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue