Inheritance: UnityEngine.MonoBehaviour
 // Use this for initialization
 void Start()
 {
     blurComponent = GetComponent<UnityStandardAssets.ImageEffects.Blur> ();
     lenses = new Lens[2];
     lenses[0] = new Lens(1);
     lenses[1] = new Lens(2);
 }
示例#2
0
        // Use this for initialization
        void Start()
        {
            animator = GetComponent<Animator>();
            blur = GetComponent<Blur>();

            int min = 0;
            int max = 5;
            float time = 0.1f;

            pause.OnPauseEnterAsObservable()
                .Subscribe(_ => iTween.ValueTo(gameObject,
                     iTween.Hash(
                         "from", min,
                         "to", max,
                         "time", time,
                         "onupdate", "OnUpdateOnPauseTransition",
                         "onstart", "OnStartOnPauseEnter")));
            //  .Subscribe(_ => animator.SetBool("isPausing", true));

            pause.OnPauseExitAsObservable()
                .Subscribe(_ => iTween.ValueTo(gameObject,
                    iTween.Hash(
                        "from", max,
                        "to", min,
                        "time", time,
                        "onupdate", "OnUpdateOnPauseTransition",
                        "oncomplete", "OnCompleteOnPauseExit")));
            //  .Subscribe(_ => animator.SetBool("isPausing", false));
        }
        private void Awake()
        {
            if (faderImage == null)
                throw new Exception("faderImage is null.");

            blurFx = GetComponent<Blur>();
            blurFx.enabled = false;
        }
    private void SetBlur(bool isActive)
    {
        UnityStandardAssets.ImageEffects.Blur blur = defaultCamera.GetComponent <UnityStandardAssets.ImageEffects.Blur>();

        if (isActive)
        {
            blur.iterations = 3;
        }
        else
        {
            blur.iterations = 0;
        }
    }
示例#5
0
    // Start is called before the first frame update
    void Start()
    {
        // si il trouve pas la camera du joueur
        if (playerCam == null)
        {
            playerCam = GameObject.FindWithTag("MainCamera");
        }
        blur         = playerCam.GetComponent <UnityStandardAssets.ImageEffects.Blur>();
        blur.enabled = false;

        // si il trouve pas la canvas de l'inventaire
        if (inventoryCanvas == null)
        {
            inventoryCanvas = GameObject.Find("Inventory Panel");
        }
        inventoryCanvas.SetActive(false);
    }
示例#6
0
        // Use this for initialization
        void Start()
        {
            blur = GetComponent<Blur>();

            int min = 0;
            int max = 5;
            float time = 0.1f;

            var delay = 2;
            GameManager.instance.OnGameOverAsObservable()
                .Delay(System.TimeSpan.FromSeconds(delay))
                .Subscribe(_ => iTween.ValueTo(gameObject,
                     iTween.Hash(
                         "from", min,
                         "to", max,
                         "time", time,
                         "onupdate", "OnUpdateToResultTransition",
                         "onstart", "OnStartToResult")));
        }
 void Awake()
 {
     ReadJSON rj = new ReadJSON();
     paintings = rj.ReadJson();
     Panel_PaintInfo = text_Info.transform.parent.transform.parent.gameObject;
     blur = cameraFPS.GetComponent<Blur>();
 }
        void Awake()
        {
            ReadJSON rj = new ReadJSON();
            listPaintingsInJson = rj.ReadJson();

            SetPaintingsCountInScene();

            Panel_PaintInfo = text_Info.transform.parent.transform.parent.gameObject;
            panel_CaptureOeuvreRTS = iconCapture.transform.parent.transform.gameObject;
            panel_CaptureOeuvreFPS = button_Capture.transform.parent.transform.gameObject;
            blur = cameraRTS.GetComponent<Blur>();
        }