日期:2014-05-20 浏览次数:20866 次
public static void PlaySound(int id)
{
。。。。。。
}
class SD implements Runnable{
int _id;
SD(int id){
_id = id;
}
public void run() {
cGame.PlaySoundEx(_id);
}
}
public static void PlaySoundEx(int id)
{
......//这里是完全使用的原来函数的功能
}
//把原来的同名函数替换了,然后重新起一个线程完成原来声音函数的调用
public static void PlaySound(int id)
{
new Thread ( new SD(1) ).start();
}