void Start() { SoundMgr.SoundLoadBgm("Result_A", "Invader/Result_A"); SoundMgr.PlayBgm("Result_A"); trans = GameObject.FindGameObjectWithTag("Transition Handler"); }
private void ShowNext() { nextButton.SetActive(true); List <GameObject> pageList = quizObject[slot.index].pageList; for (int i = 0; i < pageList.Count; i++) { pageList[i].gameObject.SetActive(false); } //페이지 남음. if (index < pageList.Count) { pageList[index].SetActive(true); } else { pageList[pageList.Count - 1].SetActive(true); nextButton.SetActive(false); teamButtonObject.SetActive(true); SoundMgr.PlaySound(SoundMgr.SoundType.question_end);; } }
void Start() { firstSymbol = secondSymbol = thirdSymbol = Symbol.A; currentLetter = 0; subCanvas.SetActive(false); if (useScorePlaceholder) { if (scorePlaceholder == "") { scorePlaceholder = "Score : "; } } if (useNamePlaceholder) { if (namePlaceholder == "") { namePlaceholder = "Name : "; } } SoundMgr.SoundLoadSe("RecordDecide", decideSEPath); SoundMgr.SoundLoadSe("RecordSelect", selectSEPath); SoundMgr.SoundLoadSe("RecordNew", newRecordSEPath); SoundMgr.PlaySe("RecordNew"); }
private void CheckConfirmation() { if (Input.GetAxis("BottomGreen") == 1.0f && inputNeutral) { switch (subCanvas.GetComponent <MSMM.MenuSelector>().GetCurrentSelectedIndex()) { case 0: SoundMgr.PlaySe("RecordDecide"); resultString = SymbolToString(firstSymbol) + SymbolToString(secondSymbol) + SymbolToString(thirdSymbol); MSMM.RankingTempData.TempName = resultString; subCanvas.GetComponent <MSMM.MenuSelector>().Reset(); inputNeutral = false; this.gameObject.SetActive(false); break; case 1: SoundMgr.PlaySe("RecordDecide"); subCanvas.SetActive(false); currentLetter--; subCanvas.GetComponent <MSMM.MenuSelector>().Reset(); inputNeutral = false; break; } } }
void Start() { if (SpecialModeData.Time < 5) { currentTime = 5; } else if (SpecialModeData.Time > 20) { currentTime = 20; } else { currentTime = SpecialModeData.Time; } SoundMgr.SoundLoadBgm("SpecialBGM", "UDCommand/SpecialBGM"); SoundMgr.SoundLoadSe("SpecialSE", "UDCommand/SpecialSE"); SoundMgr.SoundLoadSe("UDCGameEnd", "UDCommand/Finish"); SoundMgr.SoundLoadSe("UDCDecide", "UDCommand/Decide"); if (SoundMgr.isBgmPlaying("SpecialBGM") == 0) { SoundMgr.PlayBgm("SpecialBGM", 0.3f); } trans = GameObject.FindGameObjectWithTag("Transition Handler"); instructText.SetActive(true); resultCanvas.SetActive(false); textAnim.SetActive(false); }
private void OnCollisionEnter(Collision coll) { if (coll.collider.tag == "Player" || coll.collider.tag == "Enemy") { if (skilltype == SkillType.Push) { Destroy(this.gameObject); Vector3 yyyy = new Vector3(0, 0.5f, 0); Instantiate(hartBroken1, coll.transform.position + yyyy, coll.transform.rotation); SoundMgr.playSound(SkillSound, musicPlayer); //맞은 상대의 위치를 뒤로 밀어준다. - 1번째 공격의 효과 coll.gameObject.GetComponent <Rigidbody>().AddRelativeForce(Vector3.forward * 400f); } if (skilltype == SkillType.PowerPush) { Destroy(this.gameObject); Vector3 yyyy = new Vector3(0, 0.5f, 0); Instantiate(hartBroken2, coll.transform.position + yyyy, coll.transform.rotation); SoundMgr.playSound(SkillSound, musicPlayer); //맞은 상대의 위치를 좌로 밀어준다. - 2번째 공격의 효과 coll.gameObject.GetComponent <Rigidbody>().AddRelativeForce(Vector3.left * 500f); } } }
void Update() { if (Input.GetAxis("BottomGreen") == 1) { var menuSelector = GetComponent <MSMM.MenuSelector>(); var index = menuSelector.GetCurrentSelectedIndex(); if (index == 0) { UDCommand.SelectedGameMode.SetMode(0); trans.GetComponent <MSMM.Transition>().LoadScene("UDCMain"); SoundMgr.PlaySe("UDCDecide"); menuSelector.Reset(); } else if (index == 1) { UDCommand.SelectedGameMode.SetMode(1); trans.GetComponent <MSMM.Transition>().LoadScene("UDCMain"); SoundMgr.PlaySe("UDCDecide"); menuSelector.Reset(); } else if (index == 2) { trans.GetComponent <MSMM.Transition>().LoadScene("UDCRanking"); SoundMgr.PlaySe("UDCDecide"); menuSelector.Reset(); } } }
// Start is called before the first frame update void Start() { Vector3 pos3D = new Vector3(posX, posY, posZ); pos3D.z = posZ; this.transform.position = pos3D; goGM = GameObject.Find("GameManager"); scGM = goGM.GetComponent <GameManager>(); scCM = goGM.GetComponent <CreateMaze>(); goSM = GameObject.Find("SoundManager"); scSM = goSM.GetComponent <SoundMgr>(); enemyGO = null; variableJoystick.SetMode(JoystickType.Fixed); variableJoystick.AxisOptions = AxisOptions.Both; variableJoystick.SnapX = false; variableJoystick.SnapY = false; rd.freezeRotation = true; scCM.makeMaze(0); setMyItemImage(0, 0); setMyItemImage(1, 1); scGM.attack = 100; scGM.deffence = 100; setButtonImage(0, 0); setButtonImage(1, 0); goText.GetComponent <Text>().text = ""; scGM.heal = 0; }
void Start() { rend = GetComponent <Renderer>(); StartCoroutine(DeadEffectCreate()); StartCoroutine(ColorChange()); //プレイヤー if (PlayerShot) { this.GetComponent <Rigidbody>().AddForce( (transform.forward) * speed, ForceMode.VelocityChange); } //敵 if (!PlayerShot && isleft) { this.GetComponent <Rigidbody>().AddForce( (transform.forward + transform.right) * -speed, ForceMode.VelocityChange); } if (!PlayerShot && !isleft) { this.GetComponent <Rigidbody>().AddForce( (transform.forward - transform.right) * -speed, ForceMode.VelocityChange); } //10s消滅させる Destroy(this.gameObject, 10); //サウンドロード SoundMgr.SoundLoadSe("Bounce", "Invader/Bounce"); }
//壁ぶつかったら音 void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Wall") { SoundMgr.PlaySe("Bounce", 4); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { Player player = collision.gameObject.GetComponent <Player>(); if (player.isPowerUP) { SoundMgr.Instance().PlaySoundEffect(2); // 揍飞 isfly = true; GetComponent <CircleCollider2D>().enabled = false; Vector2 dir = player.rg.velocity; if (dir.magnitude < 1) { dir *= 1 / dir.magnitude; } rg.constraints = RigidbodyConstraints2D.None; rg.velocity = dir * fly_speed; rotate_speed = 100f; //顿帧 LevelPanel.levelPanel.BottomFrame(); LevelPanel.levelPanel.ShakeObj(transform); } } }
public void Awake() { //only keep first copy of script if (_instance == null) { _instance = this; } else { Destroy(this); } if (audioSource == null) { audioSource = this.gameObject.AddComponent <AudioSource>(); if (audioSource) { audioSource.playOnAwake = false; } } audioSfxList = new List <AudioSource>(); DontDestroyOnLoad(this); }
void Update() { if (active) { if (initialInput) { if (stickNeutral) { if (Input.GetAxis("Horizontal") > 0.5f) { if (selectSEPath != "") { SoundMgr.PlaySe("SelectSE"); } selectedIndex++; if (selectedIndex > (buttons.Length - 1)) { selectedIndex = 0; } } if (Input.GetAxis("Horizontal") < -0.5f) { if (selectSEPath != "") { SoundMgr.PlaySe("SelectSE"); } selectedIndex--; if (selectedIndex < 0) { selectedIndex = buttons.Length - 1; } } stickNeutral = false; } } if (!initialInput) { if ((Input.GetAxis("Horizontal") != 0) || (Input.GetAxis("Vertical") != 0)) { if (selectSEPath != "") { SoundMgr.PlaySe("SelectSE"); } selectedIndex = 0; initialInput = true; stickNeutral = false; } } if (Input.GetAxis("Horizontal") == 0) { stickNeutral = true; } ChangeColorBySelection(selectedIndex); } }
private void ResetCurrentCommand() { if (currentCommand >= commandObjects.Count) { var radish = commandObjects[commandObjects.Count - 1].GetComponent <CommandManager>().GetRadish(); if (radish.GetComponent <RectTransform>().anchoredPosition.y >= 150) { currentCommand = 0; correctCommands++; SoundMgr.PlaySe("UDCCorrectList", 4); commandAdded = false; } } if (correctCommands >= 10) { if (correctCommands % 10 == 0) { if (commandObjects.Count < 5 && !commandAdded) { AddCommand(); commandAdded = true; } } } }
void OnCollisionEnter(Collision collision) { //弾がぶつかったら if (collision.gameObject.tag == "Shot") { HP -= 1; if (HP <= 0) { isDead = true; //スコア Score.score += getScore; //死亡エフェクト Instantiate(EffectDead, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity); //音 SoundMgr.PlaySe("Death", 2); SoundMgr.PlaySe("ClearFanfare", 7); } //Sliderに値を設定 _Slider.value = HP; } }
void Update() { //チェックしたの敵の行動をする if (Normal) { NormalMove(); } if (Attacker) { AttackMove(); } if (Shielder) { ShieldMove(); } //ボスが死んでたら死ぬ if (STGBoss.isDead) { //死亡エフェクト Instantiate(EffectDead, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity); //音 SoundMgr.PlaySe("Death", 2); Destroy(this.gameObject); } }
void Update() { if (Input.GetAxis("BottomBlue") == 1) { SoundMgr.StopBgm(); var menuSelector = GetComponent <MSMM.MenuSelector>(); STG.SelectedGameModeSTG.SetMode(0); trans.GetComponent <MSMM.Transition>().LoadScene("InvaderMain"); menuSelector.Reset(); } if (Input.GetAxis("BottomYellow") == 1) { SoundMgr.StopBgm(); var menuSelector = GetComponent <MSMM.MenuSelector>(); STG.SelectedGameModeSTG.SetMode(0); trans.GetComponent <MSMM.Transition>().LoadScene("MainTitle"); menuSelector.Reset(); } if (Input.GetAxis("Option") == 1 && Input.GetAxis("Pause") == 1) { SoundMgr.StopBgm(); } }
//void StopChase() //{ // if(isHate) // { // if((transform.position-target.transform.position).magnitude>LoveRange) // { // isHate = false; // Move(new Vector2(0, 0)); // } // } //} protected void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { Player player = collision.gameObject.GetComponent <Player>(); if (player.isPowerUP) { SoundMgr.Instance().PlaySoundEffect(3); // 揍飞 isfly = true; GetComponent <CircleCollider2D>().enabled = false; Vector2 dir = player.rg.velocity; Move(dir * fly_speed); // 特效 GameObject a = Instantiate(effect, transform.position, Quaternion.identity); Destroy(a, 0.4f); LevelPanel.levelPanel.BottomFrame(); LevelPanel.levelPanel.ShakeObj(transform); //得分 Point.AddPoint(100 * player.kill_number); player.kill_number++; } else { player.Damage(attack); } } }
void OnCollisionEnter(Collision collision) { //プレイヤーの弾が当たったら if (collision.gameObject.tag == "Shot") { if (!STGPlayer.isDead && !STGBoss.isDead) { //スコア Score.score += getScore; } //死亡エフェクト Instantiate(EffectDead, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity); //音 SoundMgr.PlaySe("Death", 2); Destroy(this.gameObject); } //壁にぶつかるとスコア減る if (collision.gameObject.tag == "aaa") { if (!STGPlayer.isDead && Score.score > 0) { Score.score -= mScore; } Destroy(this.gameObject); } }
public static void SetVolume(SoundMgr __instance, AudioSourceMgr.Type f_eType, int f_nVol) { MyLog.LogMessage("SetVolume" , f_eType , f_nVol ); }
void Start() { active = 0; activeTime = 4; timeText = timeText.GetComponent <Text>(); isCount = false; isTimeUp = false; limitTime = time; minite = ((int)(limitTime)) / 60; limitTime = minite * 60 + second; oldSecond = 0; GameStartText = GameStartText.GetComponent <Text>(); GameStartText2 = GameStartText2.GetComponent <Text>(); StartCoroutine(Count()); SoundMgr.SoundLoadBgm("img_Title2", "Invader/img_Title2"); SoundMgr.SoundLoadBgm("Boss00", "Invader/Boss00"); SoundMgr.SoundLoadSe("Count_3,2,1", "Invader/Count_3,2,1"); SoundMgr.SoundLoadSe("BossAlert", "Invader/BossAlert"); SoundMgr.SoundLoadSe("TimeOver_A", "Invader/TimeOver_A"); }
/// <summary> /// public void PlaySe(string f_strFileName, bool f_bLoop) /// 오류 발생 /// </summary> /// <param name="__instance"></param> //[HarmonyPostfix, HarmonyPatch(typeof(SoundMgr), "PlaySe", new Type[] { typeof(string),typeof(float) })] public static void PlaySe(SoundMgr __instance, string f_strFileName, bool f_bLoop) { MyLog.LogMessage("PlaySe" , f_strFileName , f_bLoop ); }
public static void PlayEnv(SoundMgr __instance, string f_strFileName, float f_fTime) { MyLog.LogMessage("PlayEnv" , f_strFileName , f_fTime ); }
void Start() { if (selectSEPath != "") { SoundMgr.SoundLoadSe("SelectSE", selectSEPath); } }
public static SoundMgr Instance() { if (m_instance == null) { m_instance = new SoundMgr(); } return(m_instance); }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } }
public static void PlayDanceBGM(SoundMgr __instance, string f_strFileName, float f_fTime, bool f_fLoop = true) { MyLog.LogMessage("PlayDanceBGM" , f_strFileName , f_fTime , f_fLoop ); }
void Start() { SoundMgr.SoundLoadSe("Start", "Invader/Start"); SoundMgr.SoundLoadBgm("Window_Rule", "Invader/Window_Rule"); SoundMgr.PlayBgm("Window_Rule", 0.3f); trans = GameObject.FindGameObjectWithTag("Transition Handler"); }
public static SoundMgr GetSingle() { if (_single == null) { _single = GameObject.FindObjectOfType <SoundMgr>(); } return(_single); }
public GameMgr() { graphics = new GraphicsDeviceManager(this); //soundEffects = new List<SoundEffect>(); sdmgr = new SoundMgr(); sounds = new List<SoundPlayer>(); Content.RootDirectory = "Content"; rd = new BMSReader(); }
void Start() { trans = GameObject.FindGameObjectWithTag("Transition Handler"); SoundMgr.SoundLoadBgm("UDCBGM", "UDCommand/BGM"); if (SoundMgr.isBgmPlaying("UDCBGM") != 1) { SoundMgr.PlayBgm("UDCBGM", 0.5f); } }
public static SoundMgr GetInstance() { if (instance == null) { instance = new SoundMgr(); instance.Load(); } return instance; }
private void Awake() { instance = this; }