// Update is called once per frame
    void Update()
    {
        VortexEffect c = (VortexEffect)gameObject.GetComponent("VortexEffect");

        //c.angle=gameObject.transform.position.x*20;
        c.angle  = Time.time * 50;
        c.radius = new Vector2(gameObject.transform.position.x * 0.0108f, gameObject.transform.position.x * 0.0192f);
    }
    void Awake()
    {
        Services.DrugCameraEffects = this;

        sun = this.GetComponent<SunShafts>();

        noiseEffect = this.GetComponent<NoiseEffect>();
        vortexEffect = this.GetComponent<VortexEffect>();
        blur = this.GetComponent<Blur>();
        trailRenderer = GameObject.Find("John").GetComponent<TrailRenderer>();

        Services.GameState.PlayerState.WeedChangedEvent += HandleWeedChangedEvent;
    }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        audio = GetComponent<AudioSource>();
        audio.volume = 0;
        audio.enabled = false;

        enabled = false;
        increasing = false;
        decreasing = false;
        countingDown = false;

        NPCsLookingAtPlayer = "null_npc";
        PlayerLookingNPCTarget = "null_player";

        currentBlur = GetComponent<Blur>();
        currentVign = GetComponent<Vignetting>();
        currentTwirl = GetComponent<TwirlEffect>();
        currentVortex = GetComponent<VortexEffect>();

        vignDefaultIntensity = currentVign.intensity;

        currentBlur.enabled = false;
        currentVign.enabled = false;
        currentTwirl.enabled = false;
        currentVortex.enabled = false;
    }