Inheritance: ImageEffectBase
コード例 #1
0
    void SetInitialReferences()
    {
        if (LawContainers.Length != lawContentStrings.Length)
        {
            //Debug.LogError("There must be 1 textbox for each laws");
        }

        for (int i = 0; i < LawContainers.Length; i++)
        {
            Transform container = LawContainers[i].transform;
            TMP_Text  lawTitle  =
                container.Find("LawPanel/Text (TMP)").GetComponent <TMP_Text>();
            TMP_Text lawContent = container.Find("ContentPanel/Text (TMP)")
                                  .GetComponent <TMP_Text>();
            lawTitleTMP.Add(lawTitle);
            lawContentTMP.Add(lawContent);
        }

        mainTitleTMP = transform.Find("Panel/TitlePanel/Text (TMP)")
                       .GetComponent <TMP_Text>();

        _glitchEffect         = FindObjectOfType <GlitchEffect>();
        _glitchEffect.enabled = false;

        _fader = FindObjectOfType <Fading>();
    }
コード例 #2
0
 // Use this for initialization
 void Awake()
 {
     fx             = GetComponent <GlitchEffect>();
     storeIntensity = fx.intensity;
     fx.intensity   = Intensity;
     Invoke("StopGlitchEffect", TimeGlitching);
 }
コード例 #3
0
    //private void OnLevelWasLoaded(int level)
    //{
    //    Init();
    //}

    public void Init()
    {
        glitchEffect          = FindObjectOfType <GlitchEffect>();
        glitchEffect.enabled  = false;
        textCanvasGrewp.alpha = 0;
        fadeCanvasGrewp.alpha = 0;
    }
コード例 #4
0
    public void PushBugs(GlitchEffect effect)
    {
        if (this.IsDeath)
        {
            return;
        }
        GameManager.Instance.AddScore(scoreByBugs);
        Source.PlayOneShot(glitchSound);
        if (effect == null)
        {
            return;
        }
        if (currentGlitches.Any(item => item.GetType() == effect.GetType()) == false)
        {
            currentGlitches.Add(effect);

#if GAME_JOLT
            if (currentGlitches.Count >= GlitchEffect.allGlitchEffects.Length)
            {
                TrophiesManager.UnlockTrophy(Trophy.ICantSeeAnything);
            }
#endif

            global::Console.Instance.GetWriter().WriteLine($"<color=#FF3107>ERROR:: <color=#FFCD00>{effect.Description}</color></color>");
            effect.WhenCollect();
        }
    }
コード例 #5
0
    // Use this for initialization
    void Start()
    {
        glitchEffectManager = gameObject.GetComponent <GlitchEffect>();

        effectTime  = 0.0F;
        effectRange = 0.0F;
    }
コード例 #6
0
ファイル: movingBack.cs プロジェクト: duduyi2013/Round5Game
 // Use this for initialization
 void Start()
 {
     newloc_pos = new Vector3(-.58f, 2.49f, 10f);
     lenght     = Vector3.Distance(this.transform.position, newloc_pos);
     StartCoroutine(delayMove());
     glitchNow = camera_main.GetComponent <GlitchEffect> ();
     _myAud    = GetComponent <AudioSource> ();
 }
コード例 #7
0
    void Awake()
    {
        _glitchEffect         = GetComponent <GlitchEffect>();
        _glitchEffect.enabled = false;

        _superBlur         = GetComponent <SuperBlur.SuperBlur>();
        _superBlur.enabled = false;
    }
コード例 #8
0
 // Start is called before the first frame update
 void Start()
 {
     inputManager = GetComponent <InputManager>();
     ui           = GameObject.FindGameObjectWithTag("UI").GetComponent <UI_Manager>();
     glitch       = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GlitchEffect>();
     inputManager.Initialize();
     ui.Initialize();
 }
コード例 #9
0
 void Awake()
 {
     _nav = GetComponent <NavMeshAgent>();
     _nav.updateRotation = false;
     _glitchEffect       = Player.GetComponentInChildren <GlitchEffect>();
     _deadPixelGenerator = Player.GetComponentInChildren <DeadPixelGenerator>();
     _apocalypseFilter   = Player.GetComponentInChildren <ApocalypseFilter>();
     _grain = Player.GetComponentInChildren <PostProcessVolume>().sharedProfile.GetSetting <Grain>();
 }
コード例 #10
0
        void Start()
        {
            MixerInteractive.OnInteractiveButtonEvent += OnInteractiveButtonEvent;
            MixerInteractive.GoInteractive();

            mirror          = FindObjectOfType <Kino.Mirror>();
            glitchEffect    = FindObjectOfType <GlitchEffect>();
            datamosh        = FindObjectOfType <Kino.Datamosh>();
            grabbyTheAvatar = FindObjectOfType <GrabAvatar>();
        }
コード例 #11
0
 void Start()
 {
     player            = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
     image             = this.GetComponentInChildren <Image>();
     image.color       = Color.black;
     glitch            = Camera.main.GetComponent <GlitchEffect>();
     player.isCutScene = true;
     audioManager      = GameObject.Find("SceneAudioManager").GetComponent <SceneAudioManager>();
     StartCoroutine(PlayCutScene());
 }
コード例 #12
0
ファイル: CamControl.cs プロジェクト: benkuper/SoftLove
	// Use this for initialization
	void Start () {
        initPos = transform.position;
        glitch1 = GetComponent<CC_Glitch>();
        glitch2 = GetComponent<GlitchEffect>();

        OSCMaster.glitchReceived += glitchReceived;
        OSCMaster.pingReceived += pingReceived;

        pingMat = transform.FindChild("Ping").GetComponent<Renderer>().material;
    }
コード例 #13
0
    public void HandlePowerDown(PowerDownEvent e)
    {
        glitchEffect                  = FindObjectOfType <GlitchEffect>();
        glitchEffect.enabled          = true;
        glitchEffect.overallIntensity = powerDownGlitchIntensitay;

        FMODUnity.RuntimeManager.PlayOneShot("event:/SFX/Xtra_SFX/Fail_State");

        StartCoroutine(FadeOut());
    }
コード例 #14
0
 void Awake()
 {
     _firstPersonController = GetComponent <FirstPersonController>();
     _actionController      = GetComponent <ActionController>();
     _visionToggler         = GetComponent <VisionToggler>();
     _leanScript            = GetComponentInChildren <Lean>();
     _camera = GetComponentInChildren <Camera>();
     _postProcessingBehaviour = GetComponentInChildren <PostProcessingBehaviour>();
     _audioListener           = GetComponentInChildren <AudioListener>();
     _playerHudController     = GetComponent <PlayerHUDController>();
     _glitchEffect            = GetComponentInChildren <GlitchEffect>();
 }
コード例 #15
0
    protected override void OnCollect()
    {
        switch (CurrentBulletType)
        {
        case BulletType.Deadly:
            PlayerController.Instance.Kill();
            break;

        case BulletType.Buggy:
            PlayerController.Instance.PushBugs(GlitchEffect.GetRandomGlitchEffect());
            break;
        }
    }
コード例 #16
0
    private void Awake()
    {
        // There should be only one NighVision script in the hub level, and it's applied to the main camera.
        nightVision = Camera.main.GetComponent <NightVision>();

        // The main camera also has a glitch effect script.
        glitchEffect = Camera.main.GetComponent <GlitchEffect>();

        if (zoneType == ZoneType.Switch)
        {
            connectedPowerable = GetComponentInParent <PowerableObject>();
        }
    }
コード例 #17
0
    private IEnumerator StartGlitchEffect()
    {
        GlitchEffect glitchEffect = camera.GetComponent <GlitchEffect>();
        float        value        = 0;

        while (Math.Abs(value - 1) > 0.05)
        {
            value = Mathf.Lerp(value, 1, Time.deltaTime / 10);
            glitchEffect.intensity      = value;
            glitchEffect.colorIntensity = value;
            glitchEffect.flipIntensity  = value;

            yield return(null);
        }
    }
コード例 #18
0
 // Use this for initialization
 void Start()
 {
     ge = centerCamera.GetComponent <GlitchEffect>();
     ve = centerCamera.GetComponent <VHSPostProcessEffect>();
     de = centerCamera.GetComponent <DarkenEffect>();
     for (int i = 0; i < maxLine; i++)
     {
         display.Add("");
     }
     //keyboard.SetActive(false);
     //lockScreen.SetActive(false);
     //text.enabled = false;
     keyboardAudio.clip = keyboardClick;
     terminalAudio.clip = error;
 }
コード例 #19
0
    // Use this for initialization
    void Start()
    {
        characterMove = GetComponent <Movement> ();
        anime         = playerIdel.GetComponent <Animator> ();
        anie_end      = endingAnimation.GetComponent <Animator> ();

        characterMove.TurnOffMoveControll();
        _isMoveUnderControl = characterMove.MoveTo(destination.transform.position);

        glitchNow = camera_main.GetComponent <GlitchEffect> ();

        StartCoroutine(startAnimation());
        PublicVariables.monsterDead = false;

        _myAud = GetComponent <AudioSource> ();
    }
コード例 #20
0
 void Start()
 {
     // var camera = Camera.current;
     if (camera != null)
     {
         Debug.Log("got cam");
         glitchEffect = camera.GetComponent <GlitchEffect>();
         StartGlitch();
     }
     warningCanvas = GameObject.FindGameObjectWithTag("Respawn");
     StartCoroutine(ScrambleDecorations());
     Terminal.Shell.AddCommand("platform", PlatForm, 0, 2, "Manage Platforms. What was it even for ?");
     Terminal.Shell.AddCommand("cam", Camera, 1, 1, "Manage Camera. Those godamned bees messing with my brains!");
     Terminal.Shell.AddCommand("graphism", Graphism, 1, 1, "Manage Graphism. Let's get beautiful !");
     Terminal.Shell.AddCommand("respawn", Respawn, 0, 0, "I have a feeling of déjà-vu...");
 }
コード例 #21
0
    private void glitchCamera(Camera cam, float factor)
    {
        if (!cam)
        {
            return;
        }

        GameObject go = cam.gameObject;

        //	Not the same camera, make sure any glitches are removed from the previous camera.
        if (currentCamGO && currentCamGO != go)
        {
            var tmp = currentCamGO.GetComponent <GlitchEffect>();
            if (tmp)
            {
                tmp.enabled = false;
                Destroy(tmp);
            }
        }

        GlitchEffect glitch = go.GetComponent <GlitchEffect>();

        if (glitch == null)
        {
            Debug.LogWarning("New glitch!");
            glitch        = go.AddComponent <GlitchEffect>();
            glitch.shader = glitchShader;
        }

        glitch.O1 = Mathf.Lerp(0.025f, 0.75f, FirstChaos);
        glitch.S1 = Mathf.Lerp(0.5f, 10.0f, FirstChaos);
        glitch.O2 = Mathf.Lerp(0.001f, 0.08f, SecondChaos);
        glitch.S2 = Mathf.Lerp(5.0f, 100.0f, SecondChaos);

        glitch.Factor    = factor;
        glitch.unitValue = UnitScrubValue;
        glitch.Span      = Span;
        glitch.Rate      = Rate;
        //glitch.glitchMesh = glitchMesh;
        glitch.enabled = true;
        currentCamGO   = go;

        Dbg_Camera = go.name.ToString();
        Dbg_Factor = factor.ToString();
    }
コード例 #22
0
 // Use this for initialization
 void Start()
 {
     Cursor.visible   = false;
     Cursor.lockState = CursorLockMode.Locked;
     player           = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
     player.OnDash   += StartCamShake;
     isTransitioning  = false;
     isShakeing       = false;
     isLocked         = false;
     smoothLock       = false;
     lockPos          = Vector2.zero;
     if (pos != null && pos.testMode == true)
     {
         corner  = pos.corner;
         corner2 = pos.corner2;
     }
     if (this.transform.Find("Near") != null)
     {
         near = this.transform.Find("Near").gameObject;
     }
     if (this.transform.Find("Near'") != null)
     {
         nearR = this.transform.Find("Near'").gameObject;
     }
     if (near != null && nearR != null)
     {
         nearDis = nearR.transform.position.x - near.transform.position.x;
     }
     nearShift = 0;
     if (this.transform.Find("Far") != null)
     {
         far = this.transform.Find("Far").gameObject;
     }
     if (this.transform.Find("Far'") != null)
     {
         farR = this.transform.Find("Far'").gameObject;
     }
     if (far != null && farR != null)
     {
         farDis = farR.transform.position.x - far.transform.position.x;
     }
     nearShift = 0;
     glitch    = this.GetComponent <GlitchEffect>();
 }
コード例 #23
0
    void Start()
    {
        Screen.showCursor          = false;
        playersChosenID            = new int[4];
        currentPlayersChosenSlotID = 0;

        selected = 0;

        StartGameText.SetActive(false);
        Glitch = gameObject.GetComponent <GlitchEffect>();
        //iTween.RotateTo(gameObject, iTween.Hash("rotation", transform.position, iTween.EaseType.easeInOutSine, "time", 1.3f));
        //iTween.RotateBy(gameObject, iTween.Hash("y", .25, "easeType", "easeInOutBack", "loopType", iTween.LoopType.none, "delay", .4));

        // make controllers ready
        ControllerPlayers = new List <ControllerPlayer>();
        for (int i = 0; i < 4; ++i)
        {
            PlayerIndex      testPlayerIndex = (PlayerIndex)i;
            ControllerPlayer p = new ControllerPlayer(testPlayerIndex);
            ControllerPlayers.Add(p);
        }


        // make cameras ready
        currentSlots      = new int[4];
        readyToMoveSlot   = new bool[4];
        MyCharacter       = new RunAnimDummy[4];
        OriginalScales    = new Vector3[4];
        OriginalPositions = new Vector3[4];
        for (int i = 0; i < 4; i++)
        {
            FourCamerasSpots[i].transform.position = FourSlots[i].transform.position;
            currentSlots[i]      = i;
            OriginalScales[i]    = PlaneSlots[i].transform.localScale;
            OriginalPositions[i] = PlaneSlots[i].transform.position;

            readyToMoveSlot[i] = false;
        }

        selected = 0;
    }
コード例 #24
0
ファイル: RotateSample.cs プロジェクト: Wikzo/P6_CouchGaming
    void Start()
    {
        Screen.showCursor = false;
        playersChosenID = new int[4];
        currentPlayersChosenSlotID = 0;

        selected = 0;

        StartGameText.SetActive(false);
        Glitch = gameObject.GetComponent<GlitchEffect>();
        //iTween.RotateTo(gameObject, iTween.Hash("rotation", transform.position, iTween.EaseType.easeInOutSine, "time", 1.3f));
        //iTween.RotateBy(gameObject, iTween.Hash("y", .25, "easeType", "easeInOutBack", "loopType", iTween.LoopType.none, "delay", .4));

        // make controllers ready
        ControllerPlayers = new List<ControllerPlayer>();
        for (int i = 0; i < 4; ++i)
        {
            PlayerIndex testPlayerIndex = (PlayerIndex)i;
            ControllerPlayer p = new ControllerPlayer(testPlayerIndex);
            ControllerPlayers.Add(p);
        }

        // make cameras ready
        currentSlots = new int[4];
        readyToMoveSlot = new bool[4];
        MyCharacter = new RunAnimDummy[4];
        OriginalScales = new Vector3[4];
        OriginalPositions = new Vector3[4];
        for (int i = 0; i < 4; i++)
        {
            FourCamerasSpots[i].transform.position = FourSlots[i].transform.position;
            currentSlots[i] = i;
            OriginalScales[i] = PlaneSlots[i].transform.localScale;
            OriginalPositions[i] = PlaneSlots[i].transform.position;

            readyToMoveSlot[i] = false;
        }

        selected = 0;
    }
コード例 #25
0
 // Update is called once per frame
 void OnCollisionEnter()
 {
     if (CameraPosition == null) {
         CameraPosition = GameObject.FindWithTag("CameraTarget");
     }
     if (CameraTarget == null) {
         CameraTarget = GameObject.FindWithTag("CameraLookAtTarget");
     }
     if (glitch == null) {
         glitch = (GlitchEffect)GameObject.FindWithTag("MainCamera").GetComponent<GlitchEffect>();
     }
     var exPlayer = new GameObject ();
     exPlayer.tag = "Player";
     exPlayer.transform.position = transform.position;
     exPlayer.transform.rotation = transform.rotation;
     exPlayer.transform.parent = transform.parent;
     var explosionClone = (GameObject)Instantiate (explosion, exPlayer.transform.position, exPlayer.transform.rotation);
     explosionClone.tag = "PlayerDead";
     explosionClone.transform.parent = exPlayer.transform;
     CameraPosition.transform.parent = exPlayer.transform;
     CameraTarget.transform.parent = exPlayer.transform;
     glitch.intensity = 2;
     Destroy (gameObject);
 }
コード例 #26
0
ファイル: GlitchEffect.cs プロジェクト: Etiouse/GMTK-20
 void Start()
 {
     instance  = this;
     _material = new Material(Shader);
 }
コード例 #27
0
 protected override void OnCollect()
 {
     PlayerController.Instance.PushBugs(GlitchEffect.GetRandomGlitchEffect());
 }
コード例 #28
0
 void Start()
 {
     gefx = gameObject.GetComponent <GlitchEffect> ();
 }
コード例 #29
0
 // Start is called before the first frame update
 void Start()
 {
     glitch = GetComponent <GlitchEffect>();
     glitch.GetComponent <GlitchEffect>().enabled = false;
 }
コード例 #30
0
 // Use this for initialization
 void Start()
 {
     pivotPos = transform.position;
     ge       = camera.GetComponent <GlitchEffect>();
     de       = camera.GetComponent <DarkenEffect>();
 }
コード例 #31
0
ファイル: EnemyBehaviour.cs プロジェクト: terraKote/Card-Game
 private void Awake()
 {
     glitch         = Camera.main.GetComponent <GlitchEffect>();
     glitch.enabled = false;
 }
コード例 #32
0
 void Awake()
 {
     GM            = GameObject.Find("Game_Manager").GetComponent <Game_Manager>();
     glitchEffects = GameObject.Find("Camera").GetComponent <GlitchEffect>();
 }
コード例 #33
0
 protected override void OnColidWithPlayer(PlayerController player)
 {
     PlayerController.Instance.PushBugs(GlitchEffect.GetRandomGlitchEffect());
     Explode();
 }