37 lines
992 B
C#
37 lines
992 B
C#
using System;
|
|||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Text;
|
||
|
|
using Microsoft.Xna.Framework;
|
||
|
|
using SynthySound;
|
||
|
|
|
||
|
|
namespace EvilSatellites.Objects
|
||
|
|
{
|
||
|
|
class SynthyProp : AbstractGameObject
|
||
|
|
{
|
||
|
|
private ISoundEffect3D Sound;
|
||
|
|
public SynthyProp(IScreen screen, Vector3 pos): base(screen)
|
||
|
|
{
|
||
|
|
Sound = Screen.Manager.Sound.Load3D(@"sfx/ambience/water1.wav");
|
||
|
|
Sound.Loop = true;
|
||
|
|
Position = pos;
|
||
|
|
Sound.Position = new System.Numerics.Vector3(pos.X, pos.Y, pos.Z);
|
||
|
|
Sound.ConnectToEffect(Screen.Manager.EnvironmentEffect);
|
||
|
|
Activate();
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void Activate()
|
||
|
|
{
|
||
|
|
Sound.Play();
|
||
|
|
}
|
||
|
|
public override void Destroy()
|
||
|
|
{
|
||
|
|
Sound.Destroy();
|
||
|
|
}
|
||
|
|
|
||
|
|
override public void Update(GameTime gameTime)
|
||
|
|
{
|
||
|
|
Sound.Position = new System.Numerics.Vector3(Position.X, Position.Y, Position.Z);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|