2021-04-10 14:08:20 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using SynthySound;
|
2021-04-11 17:09:57 +02:00
|
|
|
using EvilSatellites.Screens;
|
2021-04-10 14:08:20 +02:00
|
|
|
|
|
|
|
|
namespace EvilSatellites.Objects
|
|
|
|
|
{
|
|
|
|
|
class SynthyProp : AbstractGameObject
|
|
|
|
|
{
|
|
|
|
|
private ISoundEffect3D Sound;
|
|
|
|
|
public SynthyProp(IScreen screen, Vector3 pos): base(screen)
|
|
|
|
|
{
|
2021-04-11 02:01:24 +02:00
|
|
|
Sound = Screen.Manager.Sound.Load3D(@"sfx/ui/chat.wav");
|
2021-04-10 14:08:20 +02:00
|
|
|
Sound.Loop = true;
|
|
|
|
|
Position = pos;
|
2021-04-11 14:12:55 +02:00
|
|
|
Dimensions = new Vector3(5, 5, 5);
|
2021-04-10 14:08:20 +02:00
|
|
|
Sound.Position = new System.Numerics.Vector3(pos.X, pos.Y, pos.Z);
|
2021-04-11 02:01:24 +02:00
|
|
|
// Sound.ConnectToEffect(Screen.Manager.EnvironmentEffect);
|
2021-04-10 14:08:20 +02:00
|
|
|
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);
|
|
|
|
|
}
|
2021-04-11 14:12:55 +02:00
|
|
|
|
|
|
|
|
public override void OnCollision(IGameObject obj)
|
|
|
|
|
{
|
|
|
|
|
Sound.Stop();
|
|
|
|
|
}
|
2021-04-10 14:08:20 +02:00
|
|
|
}
|
|
|
|
|
}
|