Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2010, 1:54:49 PM (14 years ago)
Author:
dafrick
Message:

Adding all classes in modules/objects to Objects module (in doxygen).
Created TriggerBase which is the base class of Trigger and MultiTrigger and now provides the shared functionality and data.
Updated some of the documentation in MultiTrigger and Script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/Script.h

    r7486 r7601  
    2828 */
    2929
     30/**
     31    @file Script.h
     32    @brief Definition of the Script class.
     33    @ingroup Objects
     34*/
     35
    3036#ifndef _Script_H__
    3137#define _Script_H__
     
    4248{
    4349
     50    /**
     51    @brief The mode a specific @ref orxonox::Script "Script" is in.
     52    */
    4453    namespace ScriptMode
    4554    {
    46         //! Modes of the Script class.
    4755        enum Value
    4856        {
    49             normal,
    50             lua
     57            normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor".
     58            lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua.
    5159        };
    5260    }
     
    5664        The Script class lets you execute a piece of code, either the normal way or in lua, through XML. It can be specified whether the code is executed upon loading (creation) of the object. Additionally the code is executed each time a trigger event comes in.
    5765        There are three parameters:
    58         'code': The code that should be executed.
    59         'mode': The mode, specifying whether the set code should be executed the normal way ('normal') or in lua ('lua'). Default is 'normal'.
    60         'onLoad': Whether the code is executed upon loading (creation) of this object. If this is set the code is executed ofr all players, regardless of the value of parameter 'forAll'. Default is true.
    61         'needsGraphics': Whether the code needs graphics to be executed or not. Default is false.
    62         'forAll': Whether the code is executed for all players each time the Script is triggered or jut for the player triggering the Script. If forAll is false, which is default, the event that triggers the Script must come from a PlayerTrigger.
     66        - @b code The code that should be executed.
     67        - @b mode The mode, specifying whether the set code should be executed the normal way (<em>normal</em>) or in lua (<em>lua</em>). Default is <em>normal</em>.
     68        - @b onLoad Whether the code is executed upon loading (creation) of this object. If this is set the code is executed ofr all players, regardless of the value of parameter <em>forAll</em>. Default is true.
     69        - @b needsGraphics Whether the code needs graphics to be executed or not. Default is false.
     70        - @b forAll Whether the code is executed for all players each time the Script is triggered or jut for the player triggering the Script. If forAll is false, which is default, the event that triggers the Script must come from a @ref orxonox::PlayerTrigger "PlayerTrigger".
    6371
    6472        Here are two examples illustrating the usage:
     
    6674        <Script code="showGUI QuestGUI" needsGraphics=true />
    6775        @endcode
    68         This would show the QuestGUI opon creation of the object. The mode is 'normal', not specified here since that is the default, also onLoad is true, also not specified, since it is the default as well. Also needsGraphics is set to true because showGUI needs graphics to work.
     76        This would show the QuestGUI opon creation of the object. The <em>mode</em> is <em>normal</em>, not specified here since that is the default, also <em>onLoad</em> is true, also not specified, since it is the default as well. Also <em>needsGraphics</em> is set to true because showGUI needs graphics to work.
    6977
    7078        @code
     
    7785        </Script>
    7886        @endcode
    79         This would hide the QuestGUI as soon as a Pawn got in range of the DistanceTrigger. The mode is 'normal', it is specified here, but could be ommitted as well, since it is the default. OnLoad is false, that is why it can't be ommitted. Also needsGraphics is set to true because showGUI needs graphics to work.
     87        This would hide the QuestGUI as soon as a @ref orxonox::Pawn "Pawn" got in range of the @ref orxonox::DistanceTrigger "DistanceTrigger". The mode is <em>normal</em>, it is specified here, but could be ommitted as well, since it is the default. <em>OnLoad</em> is false, that is why it can't be ommitted. Also <em>needsGraphics</em> is set to true because showGUI needs graphics to work.
     88
    8089    @author
    8190        Benjamin Knecht
Note: See TracChangeset for help on using the changeset viewer.