DaVikingCode / Citrus-Engine

Modern AS3 Game Engine
http://citrusengine.com/
Other
549 stars 231 forks source link

CitrusSoundGroup could be created like any other CE object, not only creating a custom class #300

Closed alamboley closed 7 years ago

gsynuh commented 7 years ago

What do you mean?

alamboley commented 7 years ago

On a specific project, I 'd to create a class:

package sound {

    import citrus.sounds.CitrusSoundGroup;

    public class VoiceSoundGroup extends CitrusSoundGroup {

        static public const VOICE:String = "VOICE";

        public function VoiceSoundGroup() {

            polyphonic = false;

            _groupID = VOICE;
        }
    }
}

I would rather: new CitrousSoundGroup({groupID:"voice", polyphonic:false});`

gsynuh commented 7 years ago

Solution :

var voiceSoundGroup:CitrusSoundGroup = sound.createGroup("VOICE"); voiceSoundGroup.polyphonic = false;

now creating your own CitrusSoundGroup class is really only for custom sound group behaviour like automatic cross fade for example.