Class: Yeah::Sound

Inherits:
Asset
  • Object
show all
Defined in:
lib/yeah/_platform/sound.rb

Overview

Note:

Provided by a Platform.

A Sound is an audio asset, which can be used to provide music and sound effects for a game.

Examples:

Playing a sound

Sound['sounds/neigh.wav'].play

Instance Attribute Summary

Attributes inherited from Asset

#path

Instance Method Summary collapse

Methods inherited from Asset

[], #initialize

Constructor Details

This class inherits a constructor from Yeah::Asset

Instance Method Details

#playObject

Play sound.


# File 'lib/yeah/_platform/sound.rb', line 9

#stopObject

Stop all playback.


# File 'lib/yeah/_platform/sound.rb', line 14