private void Update()
        {
            //如果拿到了反应核心
            if (m_ReactorCore == null && m_isExitDoorOpened == false)
            {
                //出口的门打开
                m_ExitDoorOpenDirector.Play();
                m_isExitDoorOpened = true;
                //下一场景的出口active一下
                m_EnterNextSceneCube.SetActive(true);
            }

            //播放 音效断电+"拿上核心"
            if (!m_isCoreCloseAudioPlayed)
            {
                m_AudioSource_SoundEffect.clip = m_AudioClip_CoreClose;
                m_AudioSource_SoundEffect.Play();
                m_isCoreCloseAudioPlayed = true;
            }

            //拿到核心,播放"撤退"台词
            if (m_ReactorCore == null && !m_isEvacuateAudioPlayed)
            {
                m_AudioSource_SoundEffect.clip = m_AudioClip_Evacuate;
                m_AudioSource_SoundEffect.Play();
                m_isEvacuateAudioPlayed = true;
            }
        }
Example #2
0
 //关闭托卡马卡反应柱
 public void Shutdown()
 {
     //柱子关掉Emissive(替换成无Emissive的material)
     GetComponentsInChildren <MeshRenderer>()[0].material = m_ReactorPillarShutdownMat;
     GetComponentsInChildren <MeshRenderer>()[1].material = m_ReactorPillarShutdownMat;
     GetComponentsInChildren <MeshRenderer>()[2].material = m_ReactorPillarShutdownMat;
     m_DescendingAnimDirector.Play();
 }
Example #3
0
        static int _m_Play(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.Playables.PlayableDirector gen_to_be_invoked = (UnityEngine.Playables.PlayableDirector)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1)
                {
                    gen_to_be_invoked.Play(  );



                    return(0);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Playables.PlayableAsset>(L, 2))
                {
                    UnityEngine.Playables.PlayableAsset _asset = (UnityEngine.Playables.PlayableAsset)translator.GetObject(L, 2, typeof(UnityEngine.Playables.PlayableAsset));

                    gen_to_be_invoked.Play(_asset);



                    return(0);
                }
                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Playables.PlayableAsset>(L, 2) && translator.Assignable <UnityEngine.Playables.DirectorWrapMode>(L, 3))
                {
                    UnityEngine.Playables.PlayableAsset    _asset = (UnityEngine.Playables.PlayableAsset)translator.GetObject(L, 2, typeof(UnityEngine.Playables.PlayableAsset));
                    UnityEngine.Playables.DirectorWrapMode _mode; translator.Get(L, 3, out _mode);

                    gen_to_be_invoked.Play(_asset, _mode);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Playables.PlayableDirector.Play!"));
        }
Example #4
0
        /// <summary>
        /// @brief 播放timeline,关闭玩家的操作
        /// </summary>
        public override void onSubsceneInit()
        {
            TimelineSource.Stop();
            if (GameMgr.instance)
            {
                getCamera = (SceneNetManager.instance.list[GameMgr.instance.id]).GetComponent <GetCamera>();
            }

            foreach (var p in SceneNetManager.instance.list)
            {
                p.Value.GetComponent <ReactiveTarget>().CanBeHurt = false;
                p.Value.SetActive(false);
            }
            director.Play();
        }