Skip to content

Commit

Permalink
add some method descriptions to API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
enginmanap committed Aug 26, 2018
1 parent 3253cf6 commit fb7fdd1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/APIUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,37 @@ Parameters:
bool attachSoundToObjectAndPlay(uint32_t objectWorldID, const std::string &soundPath)
=====================================================================================

Creates a sound, attaches it to an object and plays. The sound is played in loop. Attaching an object means the sound source position and velocity will follow the object. Returns false if the object is not found.

Parameter:

#. uint32_t objectWorldID: Handle id of the object to attach.
#. const std::string &soundPath: Path of the sound to play.

.. _LimonAPI-detachSoundFromObject:

bool detachSoundFromObject(uint32_t objectWorldID)
==================================================

Removes the sound already attached from the object, and stops the sound. Returns false if the object is not found.

Parameter:

#. uint32_t objectWorldID: Handle id of the object to remove.

.. _LimonAPI-playSound:

bool playSound(const std::string &soundPath, const glm::vec3 &position, bool looped)
====================================================================================

Creates and plays a sound. Returns uin32_t playing sound ID.

Parameters:

#. const std::string &soundPath: Path of the sound to play.
#. const glm::vec3 &position: World position of the sound source.
#. bool looped: Play once or play in a loop

.. _LimonAPI-loadAndSwitchWorld:

bool loadAndSwitchWorld(const std::string& worldFileName)
Expand Down

0 comments on commit fb7fdd1

Please sign in to comment.