本文整理汇总了C#中SoundManager类的典型用法代码示例。如果您正苦于以下问题:C# SoundManager类的具体用法?C# SoundManager怎么用?C# SoundManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SoundManager类属于命名空间,在下文中一共展示了SoundManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
//private bool destroyed = false;
void Start(){
soundManager = gameObject.GetComponentInChildren<SoundManager>();
energy = maxEnergy;
score = FindObjectOfType(typeof(ScoreKeeper)) as ScoreKeeper;
playerControl = gameObject.GetComponentInChildren<PlayerControl>();
playerGUI = gameObject.GetComponentInChildren<PlayerGUI>();
playerHealth = gameObject.GetComponentInChildren<PlayerHealth>();
thrust = gameObject.GetComponentInChildren<Thrust>();
shield = gameObject.AddComponent<Shield>() as Shield;
shield.PDelegate = this;
foreach(Weapon weapon in gameObject.GetComponentsInChildren(typeof(IWeapon))){
if(weapon.gameObject.name == "Left weapon"){
leftWeapon = weapon;
leftWeapon.soundManager = soundManager;
}else if(weapon.gameObject.name == "Right weapon"){
rightWeapon = weapon;
rightWeapon.soundManager = soundManager;
}
}
StartCoroutine("RegenerateEnergy");
}
示例2: GetInstance
public static SoundManager GetInstance()
{
if (_instance == null) {
_instance = GameObject.FindObjectOfType<SoundManager>();
}
return _instance;
}
示例3: Start
// Use this for initialization
void Start()
{
DontDestroyOnLoad(gameObject);
mutebutton = null;
_SoundManager = this;
}
示例4: Start
void Start()
{
buttonReleaseScript = GameObject.Find("ButtonRelease").GetComponent<ButtonReleased>();
inGameUI = GameObject.Find("InGameUIManager").GetComponent<InGameUIManager>();
nappyPadSpawnerObj = GameObject.Find("NappyPadSpawner");
if(nappyPadSpawnerObj != null)
{
nappyPadSpawnerScript = nappyPadSpawnerObj.GetComponent<NappyPadSpawner>();
}
nappyPadSpawnerScript.nappyPadCount++;
if(!inGameUI.firstNappy)
{
if(inGameUI.isLevel1)
{
inGameUI.Enable("PlayerButtonTutorialLabel5");
inGameUI.Enable("LeftArrow");
inGameUI.firstNappy = true;
}
}
sm = GameObject.Find("SoundManager").GetComponent<SoundManager>();
}
示例5: Awake
void Awake()
{
player = GameObject.Find("Player(Goliath)").GetComponent<Transform>();
PlayerAnim = GameObject.Find("Player(Goliath)").GetComponent<PlayerMovement>();
sound = GameObject.Find("Handeler").GetComponent<SoundManager>();
}
示例6: Awake
void Awake()
{
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
soundManager = GameObject.Find("SoundManager").GetComponent<SoundManager>();
effectManager = GameObject.Find("EffectManager").GetComponent<EffectManager>();
common = GameObject.Find("Common").GetComponent<Common>();
}
示例7: Awake
void Awake()
{
appManager = GetComponent<AppManager>();
guiManager = GetComponent<GUIManager>();
gameplayManager = GetComponent<GameplayManager>();
soundManager = GetComponent<SoundManager>();
}
示例8: Start
void Start()
{
var id = GetComponent<Identificationer>().id;
hp = FindObjectOfType<AirFrameParameter>().GetMaxHP(id);
MAX_HP = hp;
sound_manager_ = FindObjectOfType<SoundManager>();
}
示例9: Start
// Use this for initialization
void Start()
{
curtain = GameObject.Find ("Curtain").GetComponent<Curtain> ();
soundManager = GameObject.Find ("Sounds").GetComponent<SoundManager> ();
GameObject.Find ("MaoudamasiiLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("http://maoudamashii.jokersounds.com/");
});
GameObject.Find ("JapaneseSushiLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/37401");
});
GameObject.Find ("NebulaLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/2967");
});
GameObject.Find ("ToonySkiesLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/11020");
});
GameObject.Find ("FurnitureLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/11859");
});
GameObject.Find ("HorseLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/16687");
});
GameObject.Find ("AkibaLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://www.assetstore.unity3d.com/jp/#!/content/20359");
});
GameObject.Find ("UnityLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("http://unity3d.com/");
});
GameObject.Find ("MyLink").GetComponent<Button> ().onClick.AddListener(() => {
Application.OpenURL("https://twitter.com/ye_ey");
});
keyConfig = KeyConfig.Current;
isFinished = false;
}
示例10: Enable
public void Enable()
{
enabled = (PrefabUtility.GetPrefabType(proxy.target) != PrefabType.Prefab);
script = proxy.target as SoundManager;
mObject = new SerializedObject(proxy.target);
mCrossDuration = mObject.FindProperty("crossDuration");
mShowDebug = mObject.FindProperty("showDebug");
mOffBGM = mObject.FindProperty("offTheBGM");
mSoundConnectionsCount = mObject.FindProperty(mListCountPath);
if(script.GetComponent<Transform>().hideFlags != HideFlags.HideInInspector)
script.GetComponent<Transform>().hideFlags = HideFlags.NotEditable | HideFlags.HideInInspector;
if(script.storage == null)
{
script.storage = ScriptableObject.CreateInstance<EditorVariableStorage>();
script.storage.hideFlags = HideFlags.HideAndDontSave;
}
CheckNullMonoBehaviours();
EnableSFX();
init();
if(!script.storage.titleBar)
script.storage.titleBar = Resources.LoadAssetAtPath ("Assets/Gizmos/TitleBar.png", typeof(Texture2D)) as Texture2D;
if(!script.storage.footer)
script.storage.footer = Resources.LoadAssetAtPath ("Assets/Gizmos/AntiLunchBox Logo.png", typeof(Texture2D)) as Texture2D;
if(!script.storage.icon)
script.storage.icon = Resources.LoadAssetAtPath ("Assets/Gizmos/SoundManager Icon.png", typeof(Texture2D)) as Texture2D;
HideVariables();
}
示例11: Start
IEnumerator Start(){
soundManager=SoundManager._instance;
uiManager=UIManager._instance;
saveDataManager=SaveDataManager.instance_;
volcanoEyeManager=VolcanoEyeManager._instance;
endText.SetActive(false);
yield return new WaitForSeconds (0.5f);
while( true ){
if (Input.GetMouseButtonDown (0)) {
print("preiosno");
break;
}
yield return 0;
}
instance = this;
for( int i = 0; i < spawnPointsParent.transform.childCount; i++){
spawnPoints.Add( spawnPointsParent.transform.GetChild(i));
}
currentLives = lives;
personPrefab = Resources.Load ("PersonPrefab") as GameObject;
loadGame();
}
示例12: Start
// Use this for initialization
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").transform;
soundManager = GameObject.FindObjectOfType<SoundManager>();
world = GameObject.FindGameObjectWithTag("World").GetComponent("World") as World;
currentClip = -1;
newAudio = null;
timeTransitioning = false;
wallTransitioning = false;
timerTimeTransition1 = 0.0f;
timerWallTransition1 = 0.0f;
timerTimeTransition2 = 0.0f;
timerWallTransition2 = 0.0f;
transitionToDay = false;
transitionToNight = false;
transitionToDayFiltered = false;
transitionToNightFiltered = false;
endingTransition = false;
canEndTransition = false;
otherLayerMask = ~otherLayerMask;
transitionFrom = TRANSITION_FROM_DAY;
defaultSource = GetComponents<AudioSource>()[0];
transitionSource = GetComponents<AudioSource>()[1];
}
示例13: Initialize
public void Initialize( SoundManager.ClipData data )
{
refAudioSource = GetComponent<AudioSource>();
refAudioSource.clip = data.clip;
var soundManager = SoundManager.Instance;
refAudioSource.volume = data.volume * soundManager.masterVolume * soundManager.SEVolume;
}
示例14: Start
// Use this for initialization
void Start()
{
soundmanager = GameObject.Find("SoundManager").GetComponent<SoundManager>();
IntroAnimation = GameObject.Find("IntroAnimation");
GUIManager = GameObject.Find("GUIManager").GetComponent<GUIScript>();
soundmanager.PlayAudioClip(soundmanager.IntroBGM, soundmanager.Volum_IntroBGM);
}
示例15: Awake
// Setting up references
void Awake()
{
obstacleSpawner = GameObject.FindGameObjectWithTag("ObstacleSpawner").GetComponent<ObstacleSpawner>();
pickupSpawner = GameObject.FindGameObjectWithTag("PickupSpawner").GetComponent<PickupSpawner>();
soundManager = GameObject.FindGameObjectWithTag("SoundManagerGO").GetComponent<SoundManager>();
playerControls = player.GetComponent<CharacterUserControls>();
}