SoundRepresentation:
Filter:
GameLoop/Classes (extension) | Class

SoundRepresentation
ExtensionExtension

A basic sound representation.

Description

This class can be used to create a basic sound representation with variable sound input.

Class Methods

.new

Arguments:

repManager

an instance of RepresentationManager

collisionFunc

a function to be evaluated when a collision is detected. The function is passed the representation, entity and an array with the colliding entities

input

a sound input in the form of a function. This is really defining the source of a NodeProxy. The input is defined as a function with a speed variable passsed in as the first argument. See QuickStart for an example

release

the release time when the representation is removed

Instance Methods

.remove

This should not be called directly. Use .detach on the entity instead.

.add

This should not be called directly. Use .attach on the entity instead.