void Update() { if (!GameObject.FindGameObjectWithTag("Fade")) { if (serifBool) { Instantiate(serifObj); serifBool = false; } } if (point == 4) { if (lioBool) { Instantiate(lioObj); lioBool = false; } } if (runEnd) { if (fadeBool) { Instantiate(fadeObj); fadeBool = false; } fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = nextScene; } }
private void Notification_Load(object sender, EventArgs e) { CenterToParent(); interval = 0; FadeIn.ShowAsyc(this); }
void Start() { player = FindObjectOfType<PlayerController>(); fade = GetComponent<FadeIn>(); highScore = PlayerPrefs.GetInt("highScore"); Debug.Log(highScore); }
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { //VerseScroll.ScrollToVerticalOffset(0); VerseScroll.ChangeView(0, 0, 1, false); //Animate FadeIn.Begin(); }
public Rock SetUp(Hexagon hexagon, bool isUpper) { if (fadeAway != null) { fadeAway.Cancel(); } if (fadeIn != null) { fadeIn.Cancel(); } this.transform.parent = hexagon.transform.parent; this.transform.localPosition = isUpper ? hexagon.upPosition: hexagon.lowPosition; SpriteRenderer spriteRender = this.gameObject.GetComponent <SpriteRenderer>(); float originalLength = spriteRender.sprite.bounds.extents.x * 2f; float scale = hexagon.length / originalLength; this.transform.localScale = new Vector3(scale, scale, scale); this.transform.localPosition += Vector3.forward; this.transform.localEulerAngles = isUpper ? Vector3.zero : new Vector3(0, 0, 180f); fadeIn = new FadeIn(); fadeIn.Init(this.gameObject, .3f, null); return(this); }
void FadeOut_Completed(object sender, EventArgs e) { FadeOut.Stop(); FadeIn.Stop(); currentTextBlock.Text = textCollection[textCounter]; textCounter++; if (textCounter == 5) { textCounter = 0; if (currentTextBlock == PageTitle) { currentTextBlock = ApplicationTitle; } else { currentTextBlock = PageTitle; } Storyboard.SetTarget(FadeIn, currentTextBlock); Storyboard.SetTarget(FadeOut, currentTextBlock); } FadeIn.Begin(); }
//public Animator animator; //public string TriggerName; private void Start() { fi = GameObject.Find("QuestLocationText").GetComponent <FadeIn>(); fo = GameObject.Find("QuestLocationText").GetComponent <FadeOut>(); fi.fadeIn(); }
void DisplayOrHide(bool mouseOrTouchPresent) { isVisible = mouseOrTouchPresent; if (Locator.VideoPlayerVm.IsVideoPlayerAudioTracksSettingsVisible || Locator.VideoPlayerVm.IsVideoPlayerOptionsPanelVisible || Locator.VideoPlayerVm.IsVideoPlayerSubtitlesSettingsVisible || Locator.VideoPlayerVm.IsVideoPlayerVolumeSettingsVisible) { return; } if (!isVisible) { ControlsGridFadeOut.Value = ControlsBorder.ActualHeight; HeaderGridFadeOut.Value = -HeaderGrid.ActualHeight; FadeOut.Begin(); Locator.MediaPlaybackViewModel.MouseService.HideCursor(); } else { FadeIn.Begin(); Locator.MediaPlaybackViewModel.MouseService.ShowCursor(); } }
IEnumerator Workflow() { FadeIn fadeIn = logo.AddComponent <FadeIn>(); fadeIn.time = 1.0f; fadeIn.Begin(); yield return(new WaitForSeconds(2f)); FadeOut fadeOut = logo.AddComponent <FadeOut>(); fadeOut.time = 1.0f; fadeOut.Begin(); yield return(new WaitForSeconds(1f)); logo.SetActive(false); loadingLayer.SetActive(true); yield return(new WaitForEndOfFrame()); MoveBy move = title.AddComponent <MoveBy>(); move.offset = new Vector3(0, -2f, 0); move.time = 1f; move.Begin(); yield return(new WaitForSeconds(1f)); async = SceneManager.LoadSceneAsync("MainScene"); async.allowSceneActivation = false; yield return(StartCoroutine(Loading())); text.text = "开始游戏"; button.enabled = true; }
public void Show(double width) { popup.IsOpen = true; FadeIn.Begin(); if (width < popup.MinWidth) { popup.Width = popup.MinWidth; rootGrid.Width = popup.MinWidth; if (rootGrid.Width + HorizontalOffset > userControl.ActualWidth) { if (rootGrid.Width + DEFAULT_WIDTH_MARGIN < userControl.ActualWidth) { popup.HorizontalOffset = DEFAULT_WIDTH_MARGIN; } else { popup.HorizontalOffset = -(popup.MinWidth - userControl.ActualWidth) / 2; } } else { popup.HorizontalOffset = HorizontalOffset; } } else { popup.HorizontalOffset = HorizontalOffset; popup.Width = width; rootGrid.Width = width; } }
protected void DoFadeIn(float totalDuration, float fadeInOut, int rotationFactor) { this.fadeInOut = fadeInOut; this.rotationFactor = rotationFactor; rotateDuration = totalDuration - 2 * fadeInOut; StartAnimation(FadeIn.ForStimuli(gameObject, fadeInOut, DoRotate)); }
public void Initialize() { isEndFlag = false; next = Scene.Ending; gameObjectManager = new GameObjectManager(); particleManager = new ParticleManager(); gameObjectManager.Initialize(); particleManager.Initialize(); LifeWall.Reset(); var lifeWalls = LifeWall.GenerateWall(LifeWall.Count); gameObjectManager.AddWall(lifeWalls); nowMap = mapName[(int)Menu.GetDifficulty()]; // csvからマップを読み込む場合 var reader = GameDevice.Instance().GetCSVReader(); //reader.Read("normal.csv"); reader.Read(nowMap); var map = new Map(reader.GetData()); gameObjectManager.Add(map); scroll = map.Height; ScrollStop = false; hitStop = new HitStop(); fade = new FadeIn(); GameDevice.Instance().GetSound().PlayBGM( (Menu.GetDifficulty() == Menu.Difficulty.tutorial || Menu.GetDifficulty() == Menu.Difficulty.easy) ? "tutorial" : "stage" ); }
public Switcher SetUp(Hexagon hexagon, bool upper) { target = hexagon; isUpper = upper; this.transform.parent = hexagon.transform.parent; this.transform.localPosition = isUpper ? hexagon.upPosition + Vector3.down * .1f : hexagon.lowPosition + Vector3.up * .1f; this.transform.localScale = new Vector3(1f, 1f, 1f); this.transform.localPosition += Vector3.forward; this.transform.localEulerAngles = isUpper ? Vector3.zero : new Vector3(0, 0, 180f); Random(); UpdateColor(); if (fadeAway != null) { fadeAway.Cancel(); } if (fadeIn != null) { fadeIn.Cancel(); } fadeIn = new FadeIn(); fadeIn.Init(this.gameObject, .3f, null); return(this); }
void Start() { fadeIn = GetComponent <FadeIn>(); FadeIn.fadeInComplete += FadeInComplete; FadeIn.fadeOutComplete += FadeOutComplete; DontDestroyOnLoad(this); }
private void FadeIn_Tick(object sender, EventArgs e) { if (PresentationViewModelProp.FrontElement.IsActive) { if (PresentationViewModelProp.OpacitiyFrontElement > 1) { PresentationViewModelProp.OpacitiyFrontElement = 1; FadeIn.Stop(); } else if (PresentationViewModelProp.OpacitiyFrontElement < 1) { PresentationViewModelProp.OpacitiyFrontElement += 0.020; } } else { if (PresentationViewModelProp.OpacitiyBackElement > 1) { PresentationViewModelProp.OpacitiyBackElement = 1; FadeIn.Stop(); } else if (PresentationViewModelProp.OpacitiyBackElement < 1) { PresentationViewModelProp.OpacitiyBackElement += 0.020; } } }
void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { Debug.WriteLine("CordovaBrowser_LoadCompleted"); string[] autoloadPlugs = this.configHandler.AutoloadPlugins; foreach (string plugName in autoloadPlugs) { //nativeExecution.ProcessCommand(commandCallParams); } string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire()})();"; try { CordovaBrowser.InvokeScript("execScript", new string[] { nativeReady }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?"); } if (this.CordovaBrowser.Opacity < 1) { FadeIn.Begin(); } }
protected override void OnFrameRun(float deltaTime, float realDeltaTime) { DebugUI.SetDebugLabel("Spawner pos", transform.position); FadeIn.RunFrame(deltaTime); DeactivateTimer.Increment(deltaTime); CreateFleetingTextAtCenter("SPAWNER"); }
void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { if (IsExiting) { // Special case, we navigate to about:blank when we are about to exit. IsolatedStorageSettings.ApplicationSettings.Save(); Application.Current.Terminate(); return; } Debug.WriteLine("CordovaBrowser_LoadCompleted"); string version = "?"; System.Windows.Resources.StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("VERSION", UriKind.Relative)); if (streamInfo != null) { using (StreamReader sr = new StreamReader(streamInfo.Stream)) { version = sr.ReadLine(); } } Debug.WriteLine("Apache Cordova native platform version " + version + " is starting"); string[] autoloadPlugs = this.configHandler.AutoloadPlugins; foreach (string plugName in autoloadPlugs) { nativeExecution.AutoLoadCommand(plugName); } // send js code to fire ready event string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire()})();"; try { CordovaBrowser.InvokeScript("eval", new string[] { nativeReady }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?"); } // attach js code to dispatch exitApp string appExitHandler = "(function(){navigator.app = navigator.app || {}; navigator.app.exitApp= function(){cordova.exec(null,null,'CoreEvents','__exitApp',[]); }})();"; try { CordovaBrowser.InvokeScript("eval", new string[] { appExitHandler }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to add appExit funtion."); } if (this.CordovaBrowser.Opacity < 1) { FadeIn.Begin(); } }
private void Awake() { GameObject fadeCanvas = null; if ((fadeCanvas = GameObject.Find("FadeCanvas")) != null) { fade = fadeCanvas.GetComponentInChildren <FadeIn>(); } }
void Start() { animalStatusCSV = GameObject.Find("AnimalList").GetComponent <AnimalStatusCSV>(); canvas = GameObject.Find("Canvas"); fadeIn = GameObject.Find("FadeIn").GetComponent <FadeIn>(); intervalTime = maxIntervalTime; SetupRoot(); StartCoroutine(UpdatePeopleManager()); }
//Coroutine IEnumerator LoadLevelWithDelay(string name) { //calling static method to fade back the cube FadeIn.FadBack(); //We wait 2 seconds for our blink effect to execute yield return(new WaitForSeconds(1)); //Load scene according to name SceneManager.LoadScene(name); }
void GameOverStart() { if (fadeInBool) { Instantiate(fadeInObj); fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = SkipSceneName_gameOver; fadeInBool = false; } }
private void Awake() { group = GetComponent <CanvasGroup>(); FadeIn other = GetComponent <FadeIn>(); if (other != null) { Destroy(other); } }
void Update() { if (one) { Instantiate(fadeInObj); fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = nextScene; one = false; } }
public void OnMouseDown() { if (fadeBool) { Instantiate(fadeObj); fadeBool = false; } fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = nextScene; }
// // Called every frame. 'delta' is the elapsed time since the previous frame. // public override void _Process(float delta) // { // // } private void _LevelChange(string nextLevel) { this.queueScene = nextLevel; FadeIn fadeIn = GetNode <FadeIn>("TopLayer/FadeIn"); fadeIn.Show(); fadeIn.FadeMeIn(); // Replace with function body. }
private void ChangeText() { if (textCounter == 5) { textCounter = 0; } TextRotator.Text = textCollection[textCounter]; textCounter++; FadeIn.Begin(); }
void Update() { if (start) { FadeInStart(); } if (point == 7) { if (one) { Instantiate(button1Obj); one = false; } } if (point == 8) { one = true; } if (point == 11) { if (two) { Instantiate(button2Obj); two = false; } } if (point == 12) { two = true; } if (point == 15) { if (four) { Instantiate(serif3_4Obj); Instantiate(maruObj); four = false; } } if (point == 18) { dama.give = true; } if (point == 25) { if (fadeBool) { Instantiate(fadeObj); fadeBool = false; } fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = nextScene; } }
public void StopFollowingPlayer() { mFollowPlayer = false; // This happens at the end of the game. Shortly after this we want to fade to black. FadeIn fadeIn = GameObject.FindObjectOfType <FadeIn>(); if (fadeIn != null) { fadeIn.StartFadeOut(); } }
void Start() { fadeIn = GameObject.Find("Panel").GetComponent <FadeIn>(); // Textコンポーネント取得 timeText = GetComponent <Text>(); // 残り時間を設定 currentTime = gameTime; seSound = this.GetComponent <AudioSource>(); onceFlag = true; }
public void PlayStart() { if (one) { Instantiate(fadeInObj); one = false; } fadeIn = FindObjectOfType <FadeIn>(); fadeIn.sceneName = nextScene; Destroy(this.gameObject); }
void Start() { startSIZ.x = 246f; startSIZ.y = 93f; quitSIZ.x = 215f; quitSIZ.y = 100f; startPOS.x = Screen.width*0.75f-(startSIZ.x*0.5f); startPOS.y = Screen.height-startSIZ.y-quitSIZ.y-40f; quitPOS.x = Screen.width*0.75f-(quitSIZ.x*0.5f); quitPOS.y = startSIZ.y+startPOS.y; logoSIZ.x = 1024f; logoSIZ.y = 358f; logoPOS.x = Screen.width*0.5f-(logoSIZ.x*0.5f); logoPOS.y = 50f; instSIZ.x = Screen.width*0.34f; instSIZ.y = 200f; instPOS.y = Screen.height-instSIZ.y-40f; instPOS.x = Screen.width*0.25f-(instSIZ.x*0.5f); fader = GetComponent<FadeIn>(); }
// Use this for initialization void Start() { LOST = false; counter = 0; soundFX = false; audio.Play(); pieces = 12; pieceHP = 100f; scale = 0.635f; hplengthMAX = scale*Screen.width; hplength = hplengthMAX; frame.x = 0.66f*Screen.width; frame.y = 100f; hpPOS.x = 15; hpPOS.y = 12; hpheight = 40; hungrySIZ.x = 650f; hungrySIZ.y = 100f; hungryPOS.x = (Screen.width-hungrySIZ.x)*0.5f; hungryPOS.y = 20f; ice = new GameObject[11]; ice[0] = transform.Find("iceberg_1").gameObject; ice[1] = transform.Find("iceberg_2").gameObject; ice[2] = transform.Find("iceberg_3").gameObject; ice[3] = transform.Find("iceberg_4").gameObject; ice[4] = transform.Find("iceberg_5").gameObject; ice[5] = transform.Find("iceberg_6").gameObject; ice[6] = transform.Find("iceberg_7").gameObject; ice[7] = transform.Find("iceberg_8").gameObject; ice[8] = transform.Find("iceberg_9").gameObject; ice[9] = transform.Find("iceberg_10").gameObject; ice[10] = transform.Find("iceberg_11").gameObject; // penguinSIZ = 30f; penguins = new bool[11]; won_wave = false; degrade = false; wave_over = false; index = -1; speed = 4f; pause = false; for (int i = 0; i < 11; i++) { penguins[i] = true; } // penguin1.x = 5f; // penguin1.y = -88f; // penguin2.x = 35f; // penguin2.y = -53f; // penguin3.x = 47f; // penguin3.y = -15f; // penguin4.x = 48f; // penguin4.y = 43f; // penguin5.x = 10f; // penguin5.y = 63f; // penguin6.x = -28f; // penguin6.y = 78f; // penguin7.x = -62f; // penguin7.y = 58f; // penguin8.x = -93f; // penguin8.y = 25f; // penguin9.x = -90f; // penguin9.y = -26f; // penguin10.x = -84f; // penguin10.y = -66f; // penguin11.x = -41f; // penguin11.y = -87f; move = GetComponent<Movement>(); world = GetComponent<World>(); fadeI = GetComponent<FadeIn>(); fadeO = GetComponent<FadeOut>(); music = GetComponent<Sound>(); fade1 = false; fade2 = false; world.enabled = true; levelSIZ.x = 600f; levelSIZ.y = 80f; levelPOS.y = Screen.height-86f+5f; levelPOS.x = Screen.height*0.75f; offset.x = 3f; offset.y = 3f; cam = GameObject.Find("Main Camera"); Heal(); }