当前位置: 首页>>代码示例>>C#>>正文


C# SoundManager类代码示例

本文整理汇总了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");
    }
开发者ID:biikatto,项目名称:zeroweight,代码行数:28,代码来源:PlayerDelegate.cs

示例2: GetInstance

 public static SoundManager GetInstance()
 {
     if (_instance == null) {
         _instance = GameObject.FindObjectOfType<SoundManager>();
     }
     return _instance;
 }
开发者ID:longvannguyendx,项目名称:NinjaCrazy,代码行数:7,代码来源:SoundManager.cs

示例3: Start

    // Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(gameObject);
        mutebutton = null;

        _SoundManager = this;
    }
开发者ID:gamesatqu,项目名称:ABG-Rush,代码行数:8,代码来源:SoundManager.cs

示例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>();
    }
开发者ID:uabhanu,项目名称:Nappyville,代码行数:25,代码来源:NappyPad.cs

示例5: Awake

 void Awake()
 {
     player = GameObject.Find("Player(Goliath)").GetComponent<Transform>();
     PlayerAnim = GameObject.Find("Player(Goliath)").GetComponent<PlayerMovement>();
     sound = GameObject.Find("Handeler").GetComponent<SoundManager>();
     
 }
开发者ID:DavidZwit,项目名称:MytheDAG2016,代码行数:7,代码来源:Projectile.cs

示例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>();
 }
开发者ID:jam0824,项目名称:dp_scr,代码行数:7,代码来源:CastOff.cs

示例7: Awake

 void Awake()
 {
     appManager = GetComponent<AppManager>();
     guiManager = GetComponent<GUIManager>();
     gameplayManager = GetComponent<GameplayManager>();
     soundManager = GetComponent<SoundManager>();
 }
开发者ID:ZacheryJohnson,项目名称:Gluten-Free-Boy,代码行数:7,代码来源:InputManager.cs

示例8: Start

 void Start()
 {
     var id = GetComponent<Identificationer>().id;
     hp = FindObjectOfType<AirFrameParameter>().GetMaxHP(id);
     MAX_HP = hp;
     sound_manager_ = FindObjectOfType<SoundManager>();
 }
开发者ID:84110,项目名称:BattleArms,代码行数:7,代码来源:HPManager.cs

示例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;
 }
开发者ID:Yukihito,项目名称:KousokuKaitenzushi,代码行数:35,代码来源:CreditPage.cs

示例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();
    }
开发者ID:piittis,项目名称:scoreProject,代码行数:33,代码来源:SoundManagerEditor.cs

示例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();

	}
开发者ID:frodillo2,项目名称:volcano,代码行数:27,代码来源:GameManager.cs

示例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];
    }
开发者ID:simonchauvin,项目名称:Mapping-The-Iceberg,代码行数:27,代码来源:AudioPhysics.cs

示例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;
 }
开发者ID:hiroki-kitahara,项目名称:Shoooooooooooooting-kitahara,代码行数:7,代码来源:SoundEntity.cs

示例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);
 }
开发者ID:jasonlu00,项目名称:LeafSOURCE,代码行数:8,代码来源:AnimationIntroScript.cs

示例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>();
 }
开发者ID:Lawrence-Abadier,项目名称:UnityProjects,代码行数:8,代码来源:DifficultyManager.cs


注:本文中的SoundManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。