예제 #1
0
파일: CRoom.cs 프로젝트: ATRi111/Quest
 //离开房间
 private void GetOut()
 {
     Takarabox.SetActive(true); //生成宝箱
     Door.SetActive(false);     //开门
     CAudioController.PlayAudio("fx_door");
     Destroy(this.gameObject);
 }
예제 #2
0
파일: CBox.cs 프로젝트: ATRi111/Quest
 public void Die()
 {
     if (m_EnergyPoint)
     {
         GenerateEnergyPoint(transform.position);
     }
     CAudioController.PlayAudio("fx_broke");
     Destroy(this.gameObject);
 }
예제 #3
0
파일: CRoom.cs 프로젝트: ATRi111/Quest
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         CAudioController.PlayAudio("fx_door");
         Door.SetActive(true);   //关门
         ActivateEnemies();
     }
 }
예제 #4
0
    protected override void OnSceneLoaded(int index)
    {
        m_Index = index;
        StopAudio("bgm2"); StopAudio("bgm1");
        switch (m_Index)
        {
        case 1:  CAudioController.PlayAudio("bgm1"); break;

        case 2:  CAudioController.PlayAudio("bgm2"); break;
        }
    }
예제 #5
0
 protected virtual void Shoot()
 {
     if (this.gameObject.activeSelf)
     {
         b_ShootPressed = Input.GetMouseButton(0);
         if (t_Shoot > 0f)
         {
             t_Shoot -= _DELTATIME;
         }
         else if (b_ShootPressed && Player.GetComponent <CPlayer>().TellEnergy() >= COST)
         {
             t_Shoot = SHOOT_CD;
             Player.GetComponent <CPlayer>().CostEnergy(COST);
             CAudioController.PlayAudio(fx_Weapon);
             GenerateBullet();
             if (Player.GetComponent <CPlayer>().TellSkillOn())   //如果使用了技能,射击两次(没写双倍蓝耗)
             {
                 Invoke(nameof(GenerateBullet), 0.1f);
             }
         }
     }
 }
예제 #6
0
 public void CloseHelp()
 {
     CAudioController.PlayAudio("fx_menu");
     Time.timeScale = 1;
     Help.SetActive(false);
 }
예제 #7
0
 public void OpenHelp()
 {
     CAudioController.PlayAudio("fx_menu");
     Time.timeScale = 0;
     Help.SetActive(true);
 }
예제 #8
0
 public void Continue()
 {
     CAudioController.PlayAudio("fx_menu");
     Time.timeScale = 1;
     PauseMenu.SetActive(false);
 }
예제 #9
0
 public void Pause()
 {
     CAudioController.PlayAudio("fx_menu");
     Time.timeScale = 0;
     PauseMenu.SetActive(true);
 }