Inheritance: MonoBehaviour
Example #1
0
        //クロスフェード用のイメージを作成
        protected bool TryCreateCrossFadeImage(float time, AdvGraphicInfo graphic)
        {
            if (LastResource == null)
            {
                return(false);
            }

            if (RawImage.texture == null)
            {
                return(false);
            }

            //前フレームのテクスチャを使ってクロスフェード処理を行う
            ReleaseTemporary();
            Material material = this.Material;

            this.copyTemporary       = RenderTextureSpace.RenderTexture.CreateCopyTemporary(0);
            CrossFade                = this.gameObject.AddComponent <UguiCrossFadeRawImage>();
            CrossFade.Timer.Unscaled = Engine.Time.Unscaled;
            CrossFade.Material       = material;
            CrossFade.CrossFade(
                copyTemporary,
                time,
                () =>
            {
                //テクスチャを破棄
                ReleaseTemporary();
            });
            return(true);
        }
 public IEnumerator PlayEvent()
 {
     if (wait)
     {
         if (fadeType == Type.In)
         {
             yield return(StartCoroutine(CrossFade.FadeAudioSourceIn(src, time)));
         }
         else
         {
             yield return(StartCoroutine(CrossFade.FadeAudioSourceOut(src, time)));
         }
     }
     else
     {
         if (fadeType == Type.In)
         {
             StartCoroutine(CrossFade.FadeAudioSourceIn(src, time));
         }
         else
         {
             StartCoroutine(CrossFade.FadeAudioSourceOut(src, time));
         }
         yield break;
     }
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        hrvReceiverScript = GameObject.FindWithTag("MeasureObject").GetComponent <OSCReceiver>();
        respawnLocation   = GameObject.FindWithTag("Player").GetComponent <RespawnScript>();
        pillarRoom        = GameObject.FindWithTag("PillarEvent").GetComponent <PillarRoomEvent>();

        //Torch changing related variables
        torches    = GameObject.FindGameObjectsWithTag("Torch");
        baseTorch  = new Vector4(0.97f, 0.73f, 0.21f, 1);
        dreadTorch = new Vector4(0.49f, 0.02f, 0.11f, 1);
        flameBGM   = GameObject.Find("MazeChanges/FlameChangeBGM").GetComponent <AudioSource>();

        //Wall changing related variables
        crossFadeScript = GetComponent <CrossFade>();

        wallOffset = new Vector2(0f, 0f);
        wallTiling = new Vector2(3f, 1.5f);

        threshWallTiling = new Vector2(-0.19f, 1.5f);          //Brick1
        threshWallOffset = new Vector2(0.6f, 0f);

        smallWallTiling = new Vector2(2f, 1.5f);          //Brick3
        smallWallOffset = new Vector2(0f, 0f);

        tinyWallTiling = new Vector2(1.2f, 1.5f);          //Brick4
        tinyWallOffset = new Vector2(0f, 0f);

        mainWallChange = firstWallChange;
        crossFadeScript.setNewMaterial(secondMaterial, secondSmallWallMaterial, secondTinyWallMaterial, secondThreshMaterial);         //The first set of materials it will change to

        //Enemy range manipulation and such
        //endEnemyRadius = GameObject.Find("End Guardian2/ProximityDetector");
        enemyDetectors = GameObject.FindGameObjectsWithTag("EnemyDetectors");
    }
Example #4
0
    void Awake()
    {
        dialogueDisplayer       = GameObject.Find("DialogueDisplayer").GetComponent <DialogueDisplayer>();
        screamSoundObjectSource = GameObject.Find("ScreamSound").GetComponent <AudioSource>();
        screamFollowObject      = GameObject.Find("ScreamFollowObject").GetComponent <ScreamFollowObject>();

        rightFacingFatherOrbTransform = GameObject.Find("RightFaceFatherOrbPos").transform;
        leftFacingFatherOrbTransform  = GameObject.Find("LeftFaceFatherOrbPos").transform;

        fatherOrbHoldTransform = GameObject.Find("RightFaceFatherOrbPos").transform;

        bubbleLineStartTransform = GameObject.Find("LineStartPosition").transform;
        proCamera          = Camera.main.GetComponent <ProCamera2D>();
        mainCamera         = Camera.main;
        managerObject      = GameObject.Find("Managers");
        fader              = managerObject.GetComponent <CrossFade>();
        roomManager        = GameObject.Find("Managers").GetComponent <RoomManager>();
        playerGO           = GameObject.Find("Player");
        player             = playerGO.GetComponent <Player>();
        defaultPlayerLayer = playerGO.layer;
        fatherOrbGO        = GameObject.Find("FatherOrb");
        fatherOrb          = fatherOrbGO.GetComponent <FatherOrb>();
        monsterGO          = GameObject.Find("Monster");
        orbController      = fatherOrbGO.GetComponent <OrbController>();
        orbEffects         = fatherOrbGO.GetComponent <OrbEffects>();
        if (monsterGO != null)
        {
            monster = monsterGO.GetComponent <Monster>();
        }
        breathCanvas = playerGO.transform.Find("BreathCanvas");
        Monster.MonsterReachedPlayer += GameOver;
    }
Example #5
0
 public DelayFadeOutSampleProvider(ISampleProvider source, bool initiallySilent = false)
 {
     this.source    = source;
     this.fadeState = initiallySilent ? FadeState.Silence : FadeState.FullVolume;
     if (_settingsObject.XVFades)
     {
         _crossFadeInstance = new CrossFade();
     }
 }
Example #6
0
        public static void Postfix_CrossFade_FadeStart(CrossFade __instance)
        {
            if (!boolState.Get("No Fade Animations", true))
            {
                return;
            }

            __instance.End();
        }
Example #7
0
 private void Initialize()
 {
     if (!initialized)
     {
         crossFade   = GetComponentInChildren <CrossFade>();
         bgColorLerp = GetComponentInChildren <MaterialColorsLerp>();
         initialized = true;
         bgColorLerp.InstantChangeColor(colors[Random.Range(0, colors.Count)]);
     }
 }
Example #8
0
		public PLCHardwareView(string name, int x, int y, int width, int height)
			: base(name, "Product Life Cycle - Hardware", x, y, width, height)
		{
			fMyDataBinder = new HardwareDataBinder(this);
			Legend = new HardwareLegend();
			//PreferredTransition = new UnCoverDown(this.BackingImage, this.BackingImage, System.Drawing.Rectangle.Empty, 2);
            PreferredTransition = new CrossFade(null, null, Rectangle.Empty, 0.5);
            //PreferredTransition = new PushDown(null, null, Rectangle.Empty, 0.5);
            //PreferredTransition = new CoverDown(null, null, Rectangle.Empty, 1.0);
            //PreferredTransition = new WipeLeft(null, null, Rectangle.Empty, 1.0);
            //PreferredTransition = new WipeDown(null, null, Rectangle.Empty, 1.0);
            //PreferredTransition = new WipeRight(null, null, Rectangle.Empty, 0.5);
        }
Example #9
0
    private void Update()
    {
        CrossFade crossFade = GameManager.Instance.CrossFade;

        if (Mathf.Abs(rigidbody2d.velocity.x) > horizontalSpeedThreshold)
        {
            crossFade.AddTargetIndex(targetIndex);
        }
        else
        {
            crossFade.RemoveTargetIndex(targetIndex.Priority);
        }
    }
Example #10
0
 public ProcBase(DeliveryMember _delivery)
 {
     this.ctrlFlag        = _delivery.ctrlFlag;
     this.chaMales        = _delivery.chaMales;
     this.chaFemales      = _delivery.chaFemales;
     this.fade            = _delivery.fade;
     this.ctrlMeta        = _delivery.ctrlMeta;
     this.sprite          = _delivery.sprite;
     this.item            = _delivery.item;
     this.feelHit         = _delivery.feelHit;
     this.auto            = _delivery.auto;
     this.voice           = _delivery.voice;
     this.particle        = _delivery.particle;
     this.se              = _delivery.se;
     this.lstMotionIK     = _delivery.lstMotionIK;
     this.AtariEffect     = _delivery.AtariEffect;
     this.FeelHitEffect3D = _delivery.FeelHitEffect3D;
     this.Hitem           = (HSceneSpriteHitem)this.sprite.objHItem.GetComponent <HSceneSpriteHitem>();
     if (Object.op_Equality((Object)ProcBase.hSceneManager, (Object)null))
     {
         ProcBase.hSceneManager = Singleton <HSceneManager> .Instance;
     }
     for (int index = 0; index < 2; ++index)
     {
         this.randVoicePlays[index] = new ShuffleRand(-1);
         this.randVoicePlays[index].Init(index != 0 ? 2 : 3);
     }
     ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>) this.isAtariHit, (Func <M0, bool>)(x => this.isAtariHitOld != x && this.CatID != 1)), (Action <M0>)(x =>
     {
         if (this.CatID == 7 && Singleton <HSceneFlagCtrl> .Instance.nowAnimationInfo.ActionCtrl.Item2 == 1 || Singleton <HSceneFlagCtrl> .Instance.nowAnimationInfo.ActionCtrl.Item2 == 2)
         {
             return;
         }
         this.isAtariHitOld = x;
         if (x)
         {
             this.AtariEffect.Play();
             if (!Singleton <HSceneManager> .Instance.isParticle)
             {
                 return;
             }
             this.FeelHitEffect3D.Play();
         }
         else
         {
             this.AtariEffect.Stop();
             this.FeelHitEffect3D.Stop();
         }
     }));
 }
Example #11
0
        public void RestartCrossFade(float fadeTime, Action onComplete)
        {
            if (CrossFade == null)
            {
                Debug.LogError("CrossFadeComponent is not found", this);
                return;
            }

            CrossFade.Restart(
                fadeTime,
                () =>
            {
                ReleaseTemporary();
                onComplete();
            });
        }
Example #12
0
    protected override void Initialize()
    {
        dataWriter  = GetComponent <DataWriter>();
        audioSource = GetComponent <AudioSource>();
        crossFade   = GetComponent <CrossFade>();

        Instantiate(audioSourcePoolPrefab, transform);

        frameCounter = 0;
        ReadGameCount();

        if (loadFirstRoom)
        {
            //load first level from root
            StartCoroutine(LoadSceneAsync(FIRST_SCENE_INDEX));
        }
    }
Example #13
0
        public void Animate()
        {

            //PlaySound("soundtrack.wma", IntPtr.Zero, PlaySoundFlags.SND_ASYNC);

            // Run through some animations
            CrossFade animation1 = new CrossFade(fBlankImage, fPictureImage, fBlankImage.Frame, 5, 200);
            animation1.Run(DesktopView.MainDesktopView.GraphDevice);

            // Clear bitmap before next animation
            //fBitmap2.ClearToWhite();

            CoverDown animation2 = new CoverDown(fBlankImage, fScreenImage, fBlankImage.Frame, 200);
            animation2.Run(DesktopView.MainDesktopView.GraphDevice);

            // Clear bitmap before next animation
            fBlankImage.ClearToWhite();

            ExpandVerticalOut animation3 = new ExpandVerticalOut(fPictureImage, fBlankImage.Frame, 250);
            animation3.Run(DesktopView.MainDesktopView.GraphDevice);
        
        }
    // Use this for initialization
    void Start()
    {
        hrvReceiverScript = GameObject.FindWithTag("MeasureObject").GetComponent<OSCReceiver>();
        respawnLocation = GameObject.FindWithTag("Player").GetComponent<RespawnScript>();
        pillarRoom = GameObject.FindWithTag("PillarEvent").GetComponent<PillarRoomEvent>();

        //Torch changing related variables
        torches = GameObject.FindGameObjectsWithTag("Torch");
        baseTorch = new Vector4(0.97f, 0.73f, 0.21f, 1);
        dreadTorch = new Vector4(0.49f, 0.02f, 0.11f, 1);
        flameBGM = GameObject.Find("MazeChanges/FlameChangeBGM").GetComponent<AudioSource>();

        //Wall changing related variables
        crossFadeScript = GetComponent<CrossFade>();

        wallOffset = new Vector2 (0f,0f);
        wallTiling = new Vector2 (3f,1.5f);

        threshWallTiling = new Vector2 (-0.19f, 1.5f); //Brick1
        threshWallOffset = new Vector2 (0.6f,0f);

        smallWallTiling = new Vector2 (2f, 1.5f); //Brick3
        smallWallOffset = new Vector2 (0f,0f);

        tinyWallTiling = new Vector2 (1.2f, 1.5f); //Brick4
        tinyWallOffset = new Vector2 (0f,0f);

        mainWallChange = firstWallChange;
        crossFadeScript.setNewMaterial(secondMaterial, secondSmallWallMaterial, secondTinyWallMaterial, secondThreshMaterial); //The first set of materials it will change to

        //Enemy range manipulation and such
        //endEnemyRadius = GameObject.Find("End Guardian2/ProximityDetector");
        enemyDetectors = GameObject.FindGameObjectsWithTag("EnemyDetectors");
    }