本文整理汇总了C#中SoundManager.PlaySound方法的典型用法代码示例。如果您正苦于以下问题:C# SoundManager.PlaySound方法的具体用法?C# SoundManager.PlaySound怎么用?C# SoundManager.PlaySound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoundManager
的用法示例。
在下文中一共展示了SoundManager.PlaySound方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
soundManager = GameObject.FindGameObjectWithTag("SoundManager").GetComponent<SoundManager>();
AudioSource audioSources = GetComponent<AudioSource>();
soundManager.PlaySound(audioSources);
timer = Time.time + secondsToLive;
}
示例2: Start
// Use this for initialization
void Start()
{
soundManager = GameObject.FindGameObjectWithTag("SoundManager").GetComponent<SoundManager>();
AudioSource[] audioSources = GetComponents<AudioSource>();
int randomSound = Random.Range(0, 2);
soundManager.PlaySound(audioSources[randomSound]);
timer = Time.time + secondsToLive;
}
示例3: Start
//
void Start()
{
//Initizalize
LoadData();
//Should i destroy the blocks? (Dependes on the int destroyBlock)
if (destroyBlock >= 5)
{
Destroy(block1.gameObject);
}
if (destroyBlock >= 10)
{
Destroy(block2.gameObject);
}
if (destroyBlock >= 15)
{
Destroy(block3.gameObject);
Destroy(survivorBlock.gameObject);
}
if (destroyBlock >= 20)
{
Destroy(block4.gameObject);
}
if (destroyBlock >= 25)
{
Destroy(block5.gameObject);
}
if (destroyBlock >= 30)
{
Destroy(block6.gameObject);
}
if (destroyBlock >= 35)
{
Destroy(block7.gameObject);
}
if (destroyBlock >= 40)
{
Destroy(block8.gameObject);
}
scoreScreen.SetActiveRecursively(false);
soundScript = Camera.mainCamera.GetComponent<SoundManager>();
menuScript = Camera.mainCamera.GetComponent<MenuManipulator>();
soundScript.PlaySound(21, true, 1f);
}
示例4: Start
//
void Start()
{
//Setting Variables
inStorm = false;
level = 0;
soundScript = this.gameObject.GetComponent<SoundManager>();
soundScript.PlaySound(0, true, 0.1f);
soundScript.PlaySound(1, true, 0.1f);
ballonManagerScript = ballonManager.GetComponent<BallonManager>();
clouds = (GameObject)GameObject.Instantiate(menuDeco);
clouds.transform.position = cloudsPos.position;
provisorio = "";
scoreScript = score.GetComponent<ScoreManipulator>();
}