void Start() { thePlayer = FindObjectOfType <Player_Movement>(); theCamera = FindObjectOfType <Main_Camera>(); theFade = FindObjectOfType <FadeManager>(); BGM = FindObjectOfType <BGMManager>(); }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); foreach (var s in audioFiles) { s.source = gameObject.AddComponent <AudioSource>(); s.source.outputAudioMixerGroup = s.audioGroup; s.source.clip = s.audioClip; s.source.volume = s.volume; s.source.loop = s.isLooping; s.source.playOnAwake = false; if (s.playOnAwake) { s.source.Play(); } } }
private void Awake() { this.objectBGMManager = GameObject.FindWithTag("BGMManager"); this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>(); this.shaper2D = this.GetComponent <Shaper2D>(); }
void Awake() { cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>(); switches = GetComponentsInChildren<MechSwitch>(); blocks = GetComponentsInChildren<MechBlock>(); spawner = GetComponentInChildren<MonsterSpawning>(); unlocked = 0; puzzleActivated = false; blockPositions = new List<List<Vector2>> { new List<Vector2> { new Vector2(-3f, 17f), new Vector2(3f, 17f), new Vector2(3f, 11f) }, new List<Vector2> { new Vector2(4f, 39f), new Vector2(-4f, 39f), new Vector2(4f, 31f) }, new List<Vector2> { new Vector2(-4f, 53f), new Vector2(4f, 53f), new Vector2(4f, 63f) } }; }
public void PressGoTitle() { //初期化処理 BGMManager.PlayBGM(BGMManager.menuBGM); SEManager.PlaySE(SEManager.decision); SceneManager.LoadScene("Title"); }
void Awake() { sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); startTime = Time.time; j = 0; }
public override void OnInspectorGUI() { BGMManager obj = target as BGMManager; for (int i = 0; i < obj.BGM_List.Count; i++) { EditorGUILayout.LabelField(obj.BGM_List[i].name); EditorGUILayout.BeginHorizontal(); { obj.BGM_List[i].have_Intoro = EditorGUILayout.Toggle("Intoro", obj.BGM_List[i].have_Intoro); if (obj.BGM_List[i].have_Intoro) { obj.BGM_List[i].intoro_Clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].intoro_Clip, typeof(AudioClip), false); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { obj.BGM_List[i].clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].clip, typeof(AudioClip), false); obj.BGM_List[i].volume = EditorGUILayout.FloatField("volume", obj.BGM_List[i].volume); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); } EditorUtility.SetDirty(obj); }
private void Start() { gameManager = GameManager.Instance; subHeartSpriteRenderer = GetComponent <SpriteRenderer>(); mainHeart = GameObject.FindGameObjectWithTag("MainHeart"); mainHeartManager = mainHeart.GetComponent <MainHeartManager>(); touchEffectSpriteRenderer = touchEffectSprite.GetComponent <SpriteRenderer>(); bgmManager = BGMManager.Instance; //============色同期================ ColorManager colorManager = ColorManager.Instance; defaultColor = colorManager.GetDefaultColor; if (!doSpecialColor) { readyColor = colorManager.GetSubColor; touchEffectSpriteRenderer.color = colorManager.GetSubColor; } lightning.glowColor = readyColor; //=============Lightning初期化=============== lightning.startPoint = this.transform.position; lightning.isPlaying = false; }
public void OnPressBGMFlag() { switch (BGMManager.baseVolume) { case 1f: BGMManager.baseVolume = 0f; BGMManager.SetVolume(1f); BGMVolumeButtonText.text = "サウンド:ON(小)"; break; case 0.5f: BGMManager.baseVolume = 1f; BGMManager.SetVolume(1f); BGMVolumeButtonText.text = "サウンド:OFF"; break; case 0f: BGMManager.baseVolume = 0.5f; BGMManager.SetVolume(1f); BGMVolumeButtonText.text = "サウンド:ON(中)"; break; default: break; } }
public override void OnInspectorGUI() { BGMManager obj = target as BGMManager; for (int i = 0; i < obj.BGM_List.Count; i++) { EditorGUILayout.BeginHorizontal(); { if (obj.BGM_List[i].is_Folding = EditorGUILayout.Toggle("", obj.BGM_List[i].is_Folding, GUILayout.Width(10))) { EditorGUILayout.LabelField(obj.BGM_List[i].name); EditorGUILayout.EndHorizontal(); GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(2)); continue; } GUI.color = new Color(0.5f, 1f, 0.5f); obj.BGM_List[i].name = EditorGUILayout.TextField("", obj.BGM_List[i].name, GUILayout.Width(200), GUILayout.Height(15)); GUI.color = Color.white; } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { obj.BGM_List[i].have_Intoro = EditorGUILayout.Toggle("Intoro", obj.BGM_List[i].have_Intoro); if (obj.BGM_List[i].have_Intoro) { obj.BGM_List[i].intoro_Clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].intoro_Clip, typeof(AudioClip), false); } } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { obj.BGM_List[i].clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].clip, typeof(AudioClip), false); obj.BGM_List[i].volume = EditorGUILayout.FloatField("volume", obj.BGM_List[i].volume); } EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); { GUILayout.FlexibleSpace(); if (GUILayout.Button("Remove", GUILayout.Width(100), GUILayout.Height(10))) { obj.Remove(i); } GUILayout.FlexibleSpace(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(2)); } if (GUILayout.Button("Add", GUILayout.Width(200), GUILayout.Height(20))) { obj.Add_BGM(); } EditorUtility.SetDirty(obj); }
public void OnDestroy() { if (this == instance) { _instance = null; } }
// Awake Start Update private void Awake() { this.objectOptionManager = GameObject.FindWithTag("OptionManager"); this.scriptGameOption = this.objectOptionManager.GetComponent <GameOption>(); this.objectBGMManager = GameObject.FindWithTag("BGMManager"); this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>(); this.cameraMain = this.objectMainCamera.GetComponent <Camera>(); this.imageHowToPlay = this.objectHowToPlayButton.GetComponent <Image>(); this.imageStart = this.objectStartButton.GetComponent <Image>(); this.imageRanking = this.objectRankingButton.GetComponent <Image>(); this.textHowToPlay = this.objectHowToPlayButtonText.GetComponent <Text>(); this.textStart = this.objectStartButtonText.GetComponent <Text>(); this.textRanking = this.objectRankingButtonText.GetComponent <Text>(); this.imageHowToPlayIcon = this.objectHowToPlayButtonIcon.GetComponent <Image>(); this.imageStartIcon = this.objectStartButtonIcon.GetComponent <Image>(); this.imageRankingIcon = this.objectRankingButtonIcon.GetComponent <Image>(); this.imageOptionButton = this.objectOptionButton.GetComponent <Image>(); this.imageOptionButtonIcon = this.objectOptionButtonIcon.GetComponent <Image>(); this.rendererBackgroundPanels = this.objectBackgroundPanels.GetComponent <SpriteRenderer>(); this.rendererBackgroundPhaseScore = this.objectBackgroundPhaseScore.GetComponent <SpriteRenderer>(); this.rendererBackgroundTotalScore = this.objectBackgroundTotalScore.GetComponent <SpriteRenderer>(); this.textMeshTitle = this.objectTextTitle.GetComponent <TextMeshProUGUI>(); this.textCopyright = this.objectTextCopyright.GetComponent <Text>(); this.textVersion = this.objectTextVersion.GetComponent <Text>(); this.textDebug = this.objectTextDebug.GetComponent <Text>(); }
void Start() { isPause = false; isConfig = false; Tutorial.SetActive(false); Setting.SetActive(false); bgmManager = GameObject.Find("BGMManager").GetComponent <BGMManager> (); }
void Awake() { layer = GameObject.FindGameObjectWithTag(Tags.gameController) .GetComponent<Layers>(); gamecon = GameObject.FindGameObjectWithTag(Tags.gameController) .GetComponent<GameController>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); }
static public BGMManager GetInstance() { if (instance == null) { instance = FindObjectOfType <BGMManager>(); } return(instance); }
private void Awake() { if (Instance) { return; } Instance = this; }
private void Start() { this.bossHPText.text = "敵HP: " + boss.Hp.ToString(); if (BGMManager.playingBGM == E_BGM.boss1) { BGMManager.PlayBGM(BGMManager.bossBGM0); } }
public void ToMainMenu() { SceneManager.LoadScene(0); if (BGMManager.Instance() != null) { Destroy(BGMManager.Instance().gameObject.GetComponent <AudioSource>()); } }
void Start() { menu.SetActive(false); ClearOutRenderTexture(texture); //theVideo.Play(); StartCoroutine(Wait()); BGM = FindObjectOfType <BGMManager>(); }
void Awake() { obstaclePrefab = Resources.Load("comp_block"); sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>(); cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); currentSetNumber = 0; sets = new List<List<Vector2>>(); List<Vector2> set1 = new List<Vector2>(); set1.Add(new Vector2(2, 0)); set1.Add(new Vector2(7, 0)); set1.Add(new Vector2(6, 1)); set1.Add(new Vector2(1, 3)); set1.Add(new Vector2(5, 3)); set1.Add(new Vector2(2, 5)); set1.Add(new Vector2(0, 6)); set1.Add(new Vector2(6, 6)); set1.Add(new Vector2(3, 7)); sets.Add(set1); List<Vector2> set2 = new List<Vector2>(); set2.Add(new Vector2(1, 0)); set2.Add(new Vector2(7, 1)); set2.Add(new Vector2(9, 2)); set2.Add(new Vector2(2, 3)); set2.Add(new Vector2(4, 4)); set2.Add(new Vector2(6, 4)); set2.Add(new Vector2(1, 5)); set2.Add(new Vector2(7, 6)); set2.Add(new Vector2(0, 7)); sets.Add(set2); List<Vector2> set3 = new List<Vector2>(); set3.Add(new Vector2(4, 0)); set3.Add(new Vector2(0, 1)); set3.Add(new Vector2(9, 4)); set3.Add(new Vector2(3, 5)); set3.Add(new Vector2(6, 6)); set3.Add(new Vector2(1, 7)); sets.Add(set3); List<Vector2> set4 = new List<Vector2>(); set4.Add(new Vector2(4, 0)); set4.Add(new Vector2(9, 0)); set4.Add(new Vector2(8, 2)); set4.Add(new Vector2(9, 3)); set4.Add(new Vector2(0, 4)); set4.Add(new Vector2(2, 5)); set4.Add(new Vector2(4, 6)); set4.Add(new Vector2(3, 7)); set4.Add(new Vector2(8, 7)); sets.Add(set4); StartCoroutine(InitializeObstacles()); }
// Awake Start Update private void Awake() { this.objectOptionManager = GameObject.FindWithTag("OptionManager"); this.scriptGameOption = this.objectOptionManager.GetComponent <GameOption>(); this.objectBGMManager = GameObject.FindWithTag("BGMManager"); this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>(); this.cameraMain = this.objectMainCamera.GetComponent <Camera>(); this.rendererBackgroundPanels = this.objectBackgroundPanels.GetComponent <SpriteRenderer>(); this.rendererBackgroundPhaseScore = this.objectBackgroundPhaseScore.GetComponent <SpriteRenderer>(); this.rendererBackgroundTotalScore = this.objectBackgroundTotalScore.GetComponent <SpriteRenderer>(); this.rendererBackgroundOption = this.objectBackgroundOption.GetComponent <SpriteRenderer>(); int indexSamplePanel = 0; foreach (Transform samplePanel in this.objectSamplePanels.transform) { this.rendererSamplePanels[indexSamplePanel] = samplePanel.gameObject.GetComponent <SpriteRenderer>(); indexSamplePanel++; } this.imageTitleButton = this.objectTitleButton.GetComponent <Image>(); this.imageTitleButtonIcon = this.objectTitleButtonIcon.GetComponent <Image>(); this.imageThemeMenuButton = this.objectThemeMenuButton.GetComponent <Image>(); this.imageThemeMenuButtonIcon = this.objectThemeMenuButtonIcon.GetComponent <Image>(); this.imageSoundMenuButton = this.objectSoundMenuButton.GetComponent <Image>(); this.imageSoundMenuButtonIcon = this.objectSoundMenuButtonIcon.GetComponent <Image>(); this.imageSelectedButtonBackground = this.objectSelectedButtonBackground.GetComponent <Image>(); this.imageSwitchThemeButton = this.objectSwitchThemeButton.GetComponent <Image>(); this.imageSwitchThemeButtonIcon = this.objectSwitchThemeButtonIcon.GetComponent <Image>(); this.imageBGMTestButton = this.objectBGMTestButton.GetComponent <Image>(); this.textBGMTestButton = this.objectBGMTestButtonText.GetComponent <Text>(); this.imageSETestButton = this.objectSETestButton.GetComponent <Image>(); this.textSETestButton = this.objectSETestButtonText.GetComponent <Text>(); this.imageSliderBGMVolumeIcon = this.objectSliderBGMVolumeIcon.GetComponent <Image>(); this.imageSliderSEVolumeIcon = this.objectSliderSEVolumeIcon.GetComponent <Image>(); this.imageSliderBGMVolumeBackground = this.objectSliderBGMVolumeBackground.GetComponent <Image>(); this.imageSliderSEVolumeBackground = this.objectSliderSEVolumeBackground.GetComponent <Image>(); this.imageSliderBGMVolumeFill = this.objectSliderBGMVolumeFill.GetComponent <Image>(); this.imageSliderSEVolumeFill = this.objectSliderSEVolumeFill.GetComponent <Image>(); this.imageSliderBGMVolumeHandleEdge = this.objectSliderBGMVolumeHandleEdge.GetComponent <Image>(); this.imageSliderSEVolumeHandleEdge = this.objectSliderSEVolumeHandleEdge.GetComponent <Image>(); this.imageSliderBGMVolumeHandleCore = this.objectSliderBGMVolumeHandleCore.GetComponent <Image>(); this.imageSliderSEVolumeHandleCore = this.objectSliderSEVolumeHandleCore.GetComponent <Image>(); this.textOptionHeader = this.objectTextOptionHeader.GetComponent <Text>(); this.textSwitchThemeHeader = this.objectTextSwitchThemeHeader.GetComponent <Text>(); this.textPreview = this.objectTextPreview.GetComponent <Text>(); this.textNote = this.objectTextNote.GetComponent <Text>(); this.textBGMVolume = this.objectTextBGMVolume.GetComponent <Text>(); this.textSEVolume = this.objectTextSEVolume.GetComponent <Text>(); }
public void OnResumeButtonClicked() { BGMManager.SetVolume(1f); this.pausePanel.SetActive(false); StartCoroutine(DelayMethod(5, () => { Time.timeScale = 1f; })); }
void Awake() { gameMgr = GameObject.FindObjectOfType <GameManager>(); sectorMgr = GameObject.FindObjectOfType <SectorManager>(); bgmMgr = GameObject.FindObjectOfType <BGMManager>(); maxHp = 100; currentHp = maxHp; um = GameObject.FindObjectOfType <UIManager>(); }
// Awake Start Update private void Awake() { this.scriptOptionDirector = this.objectOptionDirector.GetComponent <OptionDirector>(); this.objectBGMManager = GameObject.FindWithTag("BGMManager"); this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>(); this.objectSEManager = GameObject.FindWithTag("SEManager"); this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>(); }
public void ReloadPage() { BGMManager.ChangeSong(""); BGMManager.ChangeSong(@"BGM/th128_01"); /*MediaPlayer.Play(bgm); * MediaPlayer.Volume = GameConfig.FBgmvol; * MediaPlayer.Pause(); * MediaPlayer.Resume();*/ }
/**************************************************************************************************/ /*! * \fn public static void Create() * インスタンスの生成 * \return インスタンス * \remakrs SoundMangaer 下に配置 * \date 2014.12.25(Thu) * \author Masayoshi.Matsuyama@Donuts */ /**************************************************************************************************/ public static void Create() { if (instance == null) { Donuts.Sound.Manager.Create(); GameObject obj = new GameObject(); obj.name = "BGMManager"; GameObject managerObj = Donuts.Sound.Manager.GetManagerObj(); obj.transform.parent = managerObj.transform; instance = obj.AddComponent<BGMManager>(); } }
void Awake() { gameMgr = GameObject.FindObjectOfType<GameManager>(); sectorMgr = GameObject.FindObjectOfType<SectorManager>(); bgmMgr = GameObject.FindObjectOfType<BGMManager>(); maxHp = 100; currentHp = maxHp; um = GameObject.FindObjectOfType<UIManager>(); }
void OnDestroy() { // ※破棄時に、登録した実体の解除を行なっている // 自身がインスタンスなら登録を解除 if (this == instance) { _instance = null; } }
private void Awake() { if (Instance == null) { Instance = this; } else { Debug.LogError("More Than two instance"); } }
private WaitForSeconds waitTime = new WaitForSeconds(0.01f); //반복문 안에서 계속 new 실행하는 것보다 이게 성능 좋음 //Start보다 먼저 실행됨 private void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject);//다른 신으로 로드할 때마다 이 객체를 파괴하지 말아라 instance = this; } else { Destroy(this.gameObject); } }
void Awake() { sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); startTime = Time.time; bossState = 0; status = transform.parent.gameObject.GetComponent<Boss>(); boss = transform.parent; StageRefPoint = GameObject.FindGameObjectWithTag("StageRefPoint").transform.position; status.isInvicible = true; }
private void Awake() //스타트보다 먼저 실행되는 함수 { if (instance != null) { Destroy(this.gameObject); } else { DontDestroyOnLoad(this.gameObject); instance = this; } }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void Awake() { if (instance != null) { Destroy(this.gameObject); } else { DontDestroyOnLoad(this.gameObject); instance = this; } } //--------------인스턴스화를 위함 ----
void Awake() { if (instance != null) { Destroy(this.gameObject); } else { DontDestroyOnLoad(this.gameObject); instance = this; } }
void Start() { if (Globel.stage == 1) { transform.GetChild(0).GetChild(1).gameObject.SetActive(false); } else { transform.GetChild(0).GetChild(1).gameObject.SetActive(true); } BGMManager.PlayUnbattle(); }
void Awake() { if (manager == null) { manager = this; } else if (manager != this) { Destroy(this.gameObject); } DontDestroyOnLoad(this.gameObject); }
void Awake() { cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); blackDoors = blackDoorsParent.GetComponentsInChildren<ElecDoor>(); blueDoors = blueDoorsParent.GetComponentsInChildren<ElecDoor>(); redDoors = redDoorsParent.GetComponentsInChildren<ElecDoor>(); blackDoorsOpen = false; redDoorsOpen = false; blueDoorsOpen = false; }
private void Awake() { gamecon = GameObject.FindGameObjectWithTag(Tags.gameController) .GetComponent<GameController>(); gman = GameObject.FindGameObjectWithTag(Tags.gameController) .GetComponent<GUIManager>(); bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>(); bgimg = Resources.Load<Texture2D>("cover_1920x1080"); titleimg = Resources.Load<Texture2D>("title_name"); buttonRect = new Rect(700, 500, 640, 600); titleRect = new Rect(100, 0, 1800, 400); choice = 0; }
void Awake() { Screen.SetResolution(1280, 720, true); audioSource = GetComponent<AudioSource>(); sectorMgr = GameObject.FindObjectOfType<SectorManager>(); uiMgr = GameObject.FindObjectOfType<UIManager>(); bgmMgr = GameObject.FindObjectOfType<BGMManager>(); tutorial = GameObject.FindObjectOfType<Tutorial>(); Application.targetFrameRate = 60; line.color = Color.clear; isStarsVisible = new bool[stars.Length]; starsET = new float[stars.Length]; Ranking.instance.CheckInstance(); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } gameover = GetComponent<GameOverMenu>(); fader = GetComponent<Fader>(); gman = GetComponent<GUIManager>(); pauseScreen = GetComponent<PauseScreen>(); bgmm = GetComponent<BGMManager>(); semm = GetComponent<SEManager>(); GameObject storyController = GameObject.FindGameObjectWithTag(Tags.storyController); if (storyController != null) { storysemm = storyController.GetComponent<SEManager>(); } paused = false; }