Class cocos.audio.effect.Effect

Effects are sounds effect loaded in memory

Example

shot = Effect('bullet.wav')
shot.play() # Play right now
sprite.do(shot.action)

Methods

  __init__(self, filename)
Initialize the effect
  play(self)

Method Details

__init__

(Constructor) __init__(self, filename)
Initialize the effect
Parameters:
filename : fullpath
path of a WAV or Ogg audio file