コード例 #1
0
        protected IEnumerator DoLightningStrike()
        {
            AkSoundEngine.PostEvent("Play_ENV_thunder_flash_01", GameManager.Instance.PrimaryPlayer.gameObject);
            PlatformInterface.SetAlienFXColor(new Color(1f, 1f, 1f, 1f), 0.25f);
            yield return(new WaitForSeconds(0.25f));

            GameManager.Instance.MainCameraController.DoScreenShake(ThunderShake, null, false);
            yield break;
        }
コード例 #2
0
        public IEnumerator Vanish(PlayerController p)
        {
            AkSoundEngine.PostEvent("Play_ENM_darken_world_01", base.gameObject);
            while (this.baseSprite.renderer.material.GetFloat("_Opacity") > 0)
            {
                this.baseSprite.renderer.material.SetFloat("_Opacity", this.baseSprite.renderer.material.GetFloat("_Opacity") - BraveTime.DeltaTime / 2);
                for (int i = 0; i < this.layers.Length; i++)
                {
                    this.layers[i].sprite.renderer.material.SetFloat("_Opacity", this.baseSprite.renderer.material.GetFloat("_Opacity"));
                }
                this.poopil.GetComponent <tk2dBaseSprite>().renderer.material.SetFloat("_Opacity", this.baseSprite.renderer.material.GetFloat("_Opacity"));
                yield return(null);
            }
            Destroy(base.gameObject);
            PlatformInterface.SetAlienFXColor(new Color(1f, 0f, 0f, 1f), 1f);
            p.DoVibration(Vibration.Time.Quick, Vibration.Strength.Medium);
            Pixelator.Instance.HandleDamagedVignette(Vector2.zero);
            ScreenShakeSettings shakesettings = new ScreenShakeSettings(0.25f, 7f, 0.1f, 0.3f);

            GameManager.Instance.MainCameraController.DoScreenShake(shakesettings, new Vector2?(p.specRigidbody.UnitCenter), false);
            AkSoundEngine.PostEvent("Play_WPN_kthulu_blast_01", p.gameObject);
            yield break;
        }