Add collision detection with octree
This commit is contained in:
@@ -14,6 +14,7 @@ namespace EvilSatellites.Objects
|
||||
Sound = Screen.Manager.Sound.Load3D(@"sfx/ui/chat.wav");
|
||||
Sound.Loop = true;
|
||||
Position = pos;
|
||||
Dimensions = new Vector3(5, 5, 5);
|
||||
Sound.Position = new System.Numerics.Vector3(pos.X, pos.Y, pos.Z);
|
||||
// Sound.ConnectToEffect(Screen.Manager.EnvironmentEffect);
|
||||
Activate();
|
||||
@@ -32,5 +33,10 @@ namespace EvilSatellites.Objects
|
||||
{
|
||||
Sound.Position = new System.Numerics.Vector3(Position.X, Position.Y, Position.Z);
|
||||
}
|
||||
|
||||
public override void OnCollision(IGameObject obj)
|
||||
{
|
||||
Sound.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user