Esempio n. 1
0
 /// <summary>
 /// Creates a new SoundTrigger.
 /// </summary>
 /// <param name="id">The identifaction name to give the Trigger.</param>
 /// <param name="bounds">The collision area of the Trigger.</param>
 /// <param name="delayTime">The amount of time to delay between activations.</param>
 /// <param name="triggerCount">The amount of times the Trigger can be sprung.</param>
 /// <param name="soundName">The name of the sound to be played when triggered.</param>
 /// <param name="playType">The way in which the audio will played.</param>
 public SoundTrigger(string id, Eon.Physics2D.Maths.Shapes.Rectangle bounds, TimeSpan delayTime,
                     int triggerCount, string soundName, AudioTypes playType) :
     base(id, bounds, delayTime, triggerCount)
 {
     this.soundName = soundName;
     this.playType  = playType;
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new SoundTrigger.
 /// </summary>
 /// <param name="id">The identifaction name to give the Trigger.</param>
 /// <param name="bounds">The collision area of the Trigger.</param>
 /// <param name="delayTime">The amount of time to delay between activations.</param>
 /// <param name="triggerCount">The amount of times the Trigger can be sprung.</param>
 /// <param name="enabled">Wheather or not the Trigger i9s enabled from the start.</param>
 /// <param name="acceptableCollisionTypes">The only types of objects that, when
 /// collided with the Trigger can activate it.</param>
 /// <param name="soundName">The name of the sound to be played when triggered.</param>
 /// <param name="playType">The way in which the audio will played.</param>
 public SoundTrigger(string id, Eon.Physics2D.Maths.Shapes.Rectangle bounds, TimeSpan delayTime, int triggerCount,
                     bool enabled, List <string> acceptableCollisionTypes, string soundName, AudioTypes playType)
     : base(id, bounds, delayTime, triggerCount, enabled, acceptableCollisionTypes)
 {
     this.soundName = soundName;
     this.playType  = playType;
 }
Esempio n. 3
0
        /// <summary>
        /// Creates a new SoundVolume.
        /// </summary>
        /// <param name="id">The unique identifaction name
        /// to give to the SoundVolume.</param>
        /// <param name="bounds">The bounds of the SoundVolume.</param>
        /// <param name="soundName">The name of the sound to be played.</param>
        public SoundVolume(string id, Eon.Physics2D.Maths.Shapes.Rectangle bounds, string soundName)
            : base(id, bounds)
        {
            this.soundName = soundName;
            playType       = AudioTypes.Ambient;

            audioOrigin = new Vector3()
            {
                X = bounds.Center.X,
                Y = bounds.Center.Y,
                Z = 0
            };
        }