Beispiel #1
0
 private void OnEndEffect(UnityEventArgs <FXArgs> e)
 {
     enabled           = true;
     m_FogFactorTarget = 0f;
     Destroy(m_FogEffect, 4f);
     Destroy(gameObject, 4f);
 }
Beispiel #2
0
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start Exclusive Dungeon cutscene!");
     m_CutsceneView      = (CutsceneView)args.Sender;
     m_isFinishTriggered = false;
     m_isFXPlayed        = false;
     mCameraAnimation.Rewind();
     foreach (String animation in m_animationQueue)
     {
         mCameraAnimation.CrossFadeQueued(animation, 0.7f, QueueMode.CompleteOthers);
     }
     enabled = true;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = mCameraAnimation.transform;
     if (m_skyObjectHandler != null)
     {
         Invoke("DeactivateInn", 4f);
         m_skyObjectHandler.LowLODObject.SetActive(true);
         m_skyObjectHandler.HighLODObject.SetActive(false);
         m_skyObjectHandler.LowLODObject.transform.parent        = mCameraAnimation.transform;
         m_skyObjectHandler.LowLODObject.transform.localPosition = Vector3.zero;
     }
     if (m_cutsceneObjects != null)
     {
         m_cutsceneObjects.ActivateObjects();
     }
     FXMainCamera.Instance.CurrentCamera.transform.localPosition = Vector3.zero;
     FXMainCamera.Instance.CurrentCamera.transform.localRotation = Quaternion.identity;
 }
Beispiel #3
0
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("Stop ErebosFinishing cutscene!");
     m_Root.SetActive(false);
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start Exclusive Dungeon Ending cutscene!");
     transform.position = Vector3.zero;
     transform.rotation = Quaternion.identity;
     m_CutsceneView     = (CutsceneView)args.Sender;
     StartCoroutine(PlayAnim());
 }
Beispiel #5
0
 private void OnBeginEffect(UnityEventArgs <FXArgs> p_args)
 {
     m_BlurEffect            = FXMainCamera.Instance.CurrentCamera.gameObject.AddComponent <BlurEffectC>();
     m_BlurEffect.blurShader = Shader.Find("Hidden/BlurEffectConeTap");
     m_BlurEffect.DownSample = 1f;
     enabled            = true;
     m_BlurFactorTarget = 0f;
 }
Beispiel #6
0
 private void OnCutsceneStopped(Object p_sender, EventArgs p_args)
 {
     if (p_sender == MyController)
     {
         UnityEventArgs parameter = new UnityEventArgs(this);
         BroadcastMessage("OnCutsceneStop", parameter, SendMessageOptions.DontRequireReceiver);
     }
 }
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("stop community boss cutscene!");
     enabled = false;
     m_CameraMover.enabled             = false;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
 }
Beispiel #8
0
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("Stop CutsceneSummerPalaceEntrance cutscene!");
     m_Root.SetActive(false);
     StopAllCoroutines();
     LegacyLogic.Instance.ConversationManager.CutsceneStateChanged -= ConversationManager_CutsceneStateChanged;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
 }
Beispiel #9
0
 public override void Begin(Single p_lifetime, FXArgs p_args)
 {
     base.Begin(p_lifetime, p_args);
     if (m_ImpactPrefab != null)
     {
         UnityEventArgs <FXArgs> p_args2 = new UnityEventArgs <FXArgs>(this, p_args);
         Transform transform             = null;
         FXTags    component             = p_args.Origin.GetComponent <FXTags>();
         if (component != null)
         {
             GameObject gameObject = component.FindOne("CastSpot");
             if (gameObject != null)
             {
                 transform = gameObject.transform;
             }
         }
         GameObject gameObject2;
         if (transform != null)
         {
             gameObject2 = Helper.Instantiate <GameObject>(m_ImpactPrefab, transform.transform.position);
             transform.AddChildAlignOrigin(gameObject2.transform);
         }
         else
         {
             gameObject2 = Helper.Instantiate <GameObject>(m_ImpactPrefab, p_args.OriginTransform.position);
         }
         m_Instance = gameObject2;
         ChainLightning component2 = m_Instance.GetComponent <ChainLightning>();
         if (p_args.Targets != null)
         {
             foreach (GameObject gameObject3 in p_args.Targets)
             {
                 if (!String.IsNullOrEmpty(m_TargetsTag))
                 {
                     FXTags component3 = gameObject3.GetComponent <FXTags>();
                     if (component3 != null)
                     {
                         component2.Targets.Add(component3.FindOne(m_TargetsTag));
                     }
                     else
                     {
                         component2.Targets.Add(gameObject3);
                     }
                 }
                 else
                 {
                     component2.Targets.Add(gameObject3);
                 }
             }
         }
         else
         {
             component2.Targets.Add(p_args.Target);
         }
         SendBroadcastBeginEffect <UnityEventArgs <FXArgs> >(gameObject2, p_args2);
     }
 }
Beispiel #10
0
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("stop mamushi cutscene!");
     enabled = false;
     m_CameraMover.enabled = false;
     m_TitleLabel.Hide();
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
 }
Beispiel #11
0
        public override void Begin(Single p_lifetime, FXArgs p_args)
        {
            base.Begin(p_lifetime, p_args);
            m_SpawnPerTarget = Math.Max(m_SpawnPerTarget, 1);
            UnityEventArgs <FXArgs> p_args2 = new UnityEventArgs <FXArgs>(this, p_args);

            if (m_ImpactPrefab != null)
            {
                GameObject gameObject = Helper.Instantiate <GameObject>(m_ImpactPrefab, p_args.TargetTransform.position);
                if (m_AttachToTransform)
                {
                    gameObject.transform.parent = p_args.TargetTransform;
                }
                m_Instance = gameObject;
                SendBroadcastBeginEffect <UnityEventArgs <FXArgs> >(gameObject, p_args2);
            }
            if (p_args.Targets != null && m_TargetsImpactPrefab != null)
            {
                m_TargetInstances = new List <GameObject>(p_args.Targets.Count);
                foreach (GameObject gameObject2 in p_args.Targets)
                {
                    Transform  transform = gameObject2.transform;
                    GameObject gameObject;
                    if (!String.IsNullOrEmpty(m_TargetsTag))
                    {
                        FXTags component = gameObject2.GetComponent <FXTags>();
                        if (component != null)
                        {
                            GameObject[] array = component.Find(m_TargetsTag);
                            if (array.Length > 1)
                            {
                                for (Int32 i = 0; i < m_SpawnPerTarget; i++)
                                {
                                    transform  = array.RandomElement <GameObject>().transform;
                                    gameObject = Helper.Instantiate <GameObject>(m_TargetsImpactPrefab, transform.position);
                                    if (m_AttachToTargetTransforms)
                                    {
                                        gameObject.transform.parent = transform;
                                    }
                                    m_TargetInstances.Add(gameObject);
                                    SendBroadcastBeginEffect <UnityEventArgs <FXArgs> >(gameObject, p_args2);
                                }
                                continue;
                            }
                            transform = array.RandomElement <GameObject>().transform;
                        }
                    }
                    gameObject = Helper.Instantiate <GameObject>(m_TargetsImpactPrefab, transform.position);
                    if (m_AttachToTargetTransforms)
                    {
                        gameObject.transform.parent = transform;
                    }
                    m_TargetInstances.Add(gameObject);
                    SendBroadcastBeginEffect <UnityEventArgs <FXArgs> >(gameObject, p_args2);
                }
            }
        }
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("Stop Crystal Spider cutscene!");
     enabled = false;
     m_CrystalSpiderAnimation.gameObject.SetActive(false);
     StopAllCoroutines();
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
 }
Beispiel #13
0
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start ErebosFinishing cutscene!");
     m_CutsceneView = (CutsceneView)args.Sender;
     m_Root.SetActive(true);
     StartCoroutine(PlayAnim());
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_ErebosCameraAnchor.transform;
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     m_CutsceneView = (CutsceneView)args.Sender;
     enabled        = true;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = transform;
     animation.Play();
     FXMainCamera.Instance.CurrentCamera.transform.localPosition = Vector3.zero;
     FXMainCamera.Instance.CurrentCamera.transform.localRotation = Quaternion.identity;
 }
Beispiel #15
0
 private void OnEndEffect(UnityEventArgs <FXArgs> e)
 {
     for (Int32 i = 0; i < m_ParticleSystems.Length; i++)
     {
         if (m_ParticleSystems[i] != null)
         {
             m_ParticleSystems[i].Stop();
         }
     }
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start Crystal Spider cutscene!");
     m_CutsceneView = (CutsceneView)args.Sender;
     enabled        = true;
     m_CrystalSpiderAnimation.gameObject.SetActive(true);
     StartCoroutine(PlayAnim());
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_CameraAnchor.transform;
 }
		private void OnEndEffect(UnityEventArgs<FXArgs> p_args)
		{
			if (!m_ignoreEndEffectEvent)
			{
				m_BeginEffect = false;
				if (particleSystem != null)
				{
					particleSystem.Stop();
				}
			}
		}
Beispiel #18
0
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start CutsceneSummerPalaceEntrance cutscene!");
     m_CutsceneView = (CutsceneView)args.Sender;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_CameraAnchor.transform;
     m_Root.SetActive(true);
     StartCoroutine(PlayBegin());
     LegacyLogic.Instance.ConversationManager.CutsceneStateChanged -= ConversationManager_CutsceneStateChanged;
     LegacyLogic.Instance.ConversationManager.CutsceneStateChanged += ConversationManager_CutsceneStateChanged;
 }
Beispiel #19
0
 private void OnBeginEffect(UnityEventArgs <FXArgs> p_args)
 {
     m_FogEffect                = FXMainCamera.Instance.CurrentCamera.gameObject.AddComponent <GlobalFogC>();
     m_FogEffect.fogShader      = Shader.Find("Hidden/GlobalFog");
     m_FogEffect.globalDensity  = 0.01f;
     m_FogEffect.startDistance  = 0.1f;
     m_FogEffect.heightScale    = 100f;
     m_FogEffect.height         = 100f;
     m_FogEffect.globalFogColor = Color.black;
     enabled           = true;
     m_FogFactorTarget = 0.3f;
 }
Beispiel #20
0
 private void OnBeginEffect(UnityEventArgs <FXArgs> e)
 {
     if (m_attachToTarget)
     {
         transform.parent = e.EventArgs.TargetTransform;
     }
     transform.position = e.EventArgs.TargetTransform.position + m_offset;
     if (m_selfDestoryOnBeginEffect != -1f)
     {
         Destroy(gameObject, Mathf.Max(m_selfDestoryOnBeginEffect, 0f));
     }
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start MarkusWolfEntrance cutscene!");
     m_CutsceneView        = (CutsceneView)args.Sender;
     m_TriggeredFinish     = false;
     m_CameraMover.enabled = true;
     m_CameraMover.Timer   = 0f;
     enabled = true;
     m_Time  = Time.time;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_CameraMover.transform;
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start community boss cutscene!");
     m_CutsceneView        = (CutsceneView)args.Sender;
     m_isFinishTriggered   = false;
     m_isFXPlayed          = false;
     m_CameraMover.enabled = true;
     m_CameraMover.Timer   = 0f;
     enabled = true;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_CameraMover.transform;
 }
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("Stop Exclusive Dungeon Ending cutscene!");
     enabled = false;
     m_Root.SetActive(false);
     StopAllCoroutines();
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
     if (m_skyObjectHandler != null)
     {
         m_skyObjectHandler.LowLODObject.transform.parent = null;
     }
 }
Beispiel #24
0
 public void OnReceivedAttacks(UnityEventArgs p_args)
 {
     if (m_MonsterBuffGlow != null)
     {
         if (m_hitParticeFX != null)
         {
             foreach (GameObject gameObject in m_hitSpots)
             {
                 Helper.Instantiate <GameObject>(m_hitParticeFX, gameObject.transform.position, gameObject.transform.rotation).transform.parent = gameObject.transform;
             }
         }
         StopAllCoroutines();
         StartCoroutine(HitAnim());
     }
 }
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start TaralethLand cutscene!");
     m_CutsceneView                    = (CutsceneView)args.Sender;
     enabled                           = true;
     transform.position                = Vector3.zero;
     transform.rotation                = Quaternion.identity;
     m_time                            = Time.time;
     m_CameraMover.enabled             = true;
     m_CameraMover.Timer               = 0f;
     m_TriggeredTaralethLandAnimation  = false;
     m_TriggeredTaralethSwtich         = false;
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
     FXMainCamera.Instance.CurrentCamera.transform.parent = m_CameraMover.transform;
 }
 private void OnBeginEffect(UnityEventArgs <FXArgs> p_args)
 {
     m_DoubleViewEffect = FXMainCamera.Instance.CurrentCamera.gameObject.AddComponent <DoubleViewEffect>();
     m_DoubleViewEffect.invertShader  = Shader.Find("Hidden/InvertColor");
     m_DoubleViewEffect.pixelmovement = 0f;
     m_DoubleViewEffect.colorInvert   = 0.1f;
     m_TwirlEffect          = FXMainCamera.Instance.CurrentCamera.gameObject.AddComponent <TwirlEffect>();
     m_TwirlEffect.shader   = Shader.Find("Hidden/Twirt Effect Shader");
     m_TwirlEffect.radius.x = 0.6f;
     m_TwirlEffect.radius.y = 0.6f;
     m_TwirlEffect.angle    = 1f;
     enabled       = true;
     m_moveTarget  = 100f;
     m_colorTarget = 1f;
     m_turnTarget  = 190f;
 }
Beispiel #27
0
 private void OnCutsceneStop(UnityEventArgs args)
 {
     Debug.Log("stop Exclusive Dungeon cutscene!");
     enabled = false;
     mCameraAnimation.Stop();
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Normal;
     FXMainCamera.Instance.ResetCameraTransformation();
     if (m_cutsceneObjects != null)
     {
         m_cutsceneObjects.DeactivateObjects();
     }
     if (m_skyObjectHandler != null)
     {
         m_skyObjectHandler.LowLODObject.transform.parent = null;
     }
 }
Beispiel #28
0
 private void OnCutsceneStart(UnityEventArgs args)
 {
     Debug.Log("Start TaralethFlyby cutscene!");
     m_CutsceneView                   = (CutsceneView)args.Sender;
     transform.position               = Vector3.zero;
     transform.rotation               = Quaternion.identity;
     enabled                          = true;
     m_time                           = Time.time;
     m_TiggeredEnableDragonMover      = false;
     m_TiggeredEnableCameraMover      = false;
     m_finishTriggered                = false;
     m_DragonMover.enabled            = true;
     m_DragonMover.PositionTimer.Time = 0f;
     m_DragonMover.gameObject.SetActive(false);
     m_CameraMover.enabled            = true;
     m_CameraMover.PositionTimer.Time = 0f;
     m_CameraMover.gameObject.SetActive(false);
     FXMainCamera.Instance.CameraModus = FXMainCamera.EModus.Cutscene;
 }
Beispiel #29
0
        private void OnBeginEffect(UnityEventArgs <FXArgs> e)
        {
            FXTags    component = e.EventArgs.Target.GetComponent <FXTags>();
            Transform transform;

            if (component == null)
            {
                Debug.LogError("FXTags not found at model " + e.EventArgs.Target, e.EventArgs.Target);
                transform = e.EventArgs.TargetTransform;
            }
            else
            {
                transform = component.FindOne(m_Tag).transform;
            }
            this.transform.position = transform.position;
            if (m_AttackToTransform)
            {
                this.transform.parent = transform;
            }
        }
Beispiel #30
0
        public override void Destroy()
        {
            if (m_Instances == null)
            {
                return;
            }
            UnityEventArgs <FXArgs> p_args = new UnityEventArgs <FXArgs>(this, EffectArguments);

            foreach (GameObject gameObject in m_Instances)
            {
                if (gameObject != null)
                {
                    SendBroadcastEndEffect <UnityEventArgs <FXArgs> >(gameObject, p_args);
                }
            }
            if (!m_SpawnAndForget)
            {
                Helper.DestroyList <GameObject>(m_Instances);
            }
            m_Instances.Clear();
        }