protected override async void OnNavigatedTo(NavigationEventArgs e) { _rootVisual = GetVisual(PictureHost); _compositor = _rootVisual.Compositor; _imageFactory = CompositionImageFactory.CreateCompositionImageFactory(_compositor); _rootVisual.Clip = _compositor.CreateInsetClip(0, 0, 0, 0); // Begin the TransitionController to load images and kick off animations. try { _transitionController = new TransitionController(); await _transitionController.Create(_rootVisual, _imageFactory); var actualSize = new Vector2((float)PictureHost.ActualWidth, (float)PictureHost.ActualHeight); _transitionController.UpdateWindowSize(actualSize); NearSlideCheckBox_Click(this, null); FarSlideCheckBox_Click(this, null); FlashlightCheckBox_Click(this, null); ZoomCheckBox_Click(this, null); StackCheckBox_Click(this, null); _transitionController.NextTransition(); } catch { } }
public void StartRun() { List <Minigame> selected = _buttons.Where(x => x.Selected).Select(x => x.MiniGame).ToList(); PersistentDataManager.INSTANCE.CreateNewRun((new MinigameList(selected)).RandomReorder()); TransitionController.BeginExitToScene(PersistentDataManager.run.CurrentGame.SceneName); }
// Use this for initialization void Start() { isGoingOpaque = true; StartCoroutine("piscaTxt"); _TC = FindObjectOfType(typeof(TransitionController)) as TransitionController; _TC.cenaPara = "gamePlay"; }
private void Awake() { Transform sceneContainer = this.transform.GetChild(1); internalFlippables = GetComponentsInChildren <FlippableObject>(); //sets the scene container for each flippable object in this scene foreach (FlippableObject obj in internalFlippables) { obj.sceneContainer = sceneContainer; } //gathering the real and laser transforms for this scene realTransform = sceneContainer.Find("Real"); laserTransform = sceneContainer.Find("Laser"); //find the transition controllers within the scene TransitionController[] controllers = GetComponentsInChildren <TransitionController>(); foreach (TransitionController control in controllers) { if (control.gameObject.CompareTag("Laser")) { laserTransitionController = control; } else if (control.gameObject.CompareTag("Real")) { realTransitionController = control; } } }
// Start is called before the first frame update void Start() { if (this.level == 2) { Instantiate(zergling, new Vector3(3, 2, 6), Quaternion.AngleAxis(90f, Vector3.up)).transform.SetParent(transform); } Level level = GetLevel(); LevelLoader loader = new LevelLoader(this, level, levelPrefabs); ball = this.GetComponentInChildren <BallController>(); ball.gameController = this; _dialogueController = Instantiate(dialogueController, new Vector3(0, 0, 0), Quaternion.identity); dialogueScript = _dialogueController.GetComponent <DialogueController>(); dialogueScript.dialogue = new Dialogue[][] { level.introDialogue, level.outroDialogue, level.failDialogue }; dialogueScript.rubikVariant = rubikVariant; _transitionController = Instantiate(transitionController, new Vector3(0, 0, 0), Quaternion.identity); transitionScript = _transitionController.GetComponent <TransitionController>(); transitionScript.setBall(ball); transitionScript.dialogue = dialogueScript; transitionScript.cameraSettings = level.cameraSettings; loading = true; }
public IEnumerator FleeCombat() { //Sound Effect GameControl.control.stunned = true; yield return(StartCoroutine(textBox.Dialogue("You managed to escape!"))); yield return(new WaitForSeconds(1f)); BattleJukeBox.Stop(); TransitionController TC = GameObject.Find("TransitionControl(Clone)").GetComponent <TransitionController>(); GameObject.Find("JukeBox(Clone)").GetComponent <JukeBoxController>().ResumeSongPartway(); StartCoroutine(GameObject.Find("JukeBox(Clone)").GetComponent <JukeBoxController>().FadeIn(0.4f)); yield return(StartCoroutine(TC.transitionOut())); Destroy(BattleCamera); Player.SetActive(true); GameControl.control.Unfreeze(); GameControl.control.PlayerUnfreeze(); Enemy.FleeEnemy(); //Destroy(Enemy.gameObject); SceneManager.LoadScene(GameControl.control.room.ToString()); }
public IEnumerator ResolveCombat() { EnemySprite.color = new Color(1f, 1f, 1f, 0.5f); Enemy.ResolveEnemy(); BattleJukeBox.Stop(); fanfare.PlayFanfare(); yield return(StartCoroutine(textBox.Dialogue(Enemy.outroDialogue))); yield return(new WaitForSeconds(4f)); int actualMoney = Enemy.rewardMoney * (GameControl.control.numMasks + 1) + ((int)Random.Range(-GameControl.control.numMasks, Mathf.Pow(GameControl.control.numMasks, 2f))) + (int)Random.Range(-GameControl.control.numMasks, GameControl.control.numMasks); yield return(StartCoroutine(textBox.Dialogue("You received " + actualMoney + " GD."))); GameControl.control.money += actualMoney; yield return(new WaitForSeconds(4f)); //Item drop? TransitionController TC = GameObject.Find("TransitionControl(Clone)").GetComponent <TransitionController>(); GameObject.Find("JukeBox(Clone)").GetComponent <JukeBoxController>().ResumeSongPartway(); StartCoroutine(GameObject.Find("JukeBox(Clone)").GetComponent <JukeBoxController>().FadeIn(0.4f)); yield return(StartCoroutine(TC.transitionOut())); Destroy(BattleCamera); Player.SetActive(true); GameControl.control.Unfreeze(); GameControl.control.PlayerUnfreeze(); SceneManager.LoadScene(GameControl.control.room.ToString()); yield return(null); }
// Start is called before the first frame update void Start() { tc = FindObjectOfType <TransitionController>(); sC = this; timerIsOn = true; timer = 0.5f; }
public bool transition; // In certain instances, player goes directly from Door to driving, in which case, loading screen must be called. void Awake() { player = GameObject.Find("Player"); pc = player.GetComponent <PlayerController>(); gm = GameObject.Find("GameManager").GetComponent <GameManager>(); sf = GameObject.Find("GameManager").GetComponent <ScreenFader>(); tc = GameObject.Find("GameManager").GetComponent <TransitionController>(); }
void Awake() { controller = GetComponent <TransitionController>(); expandPanelImage = expandPanelGO.GetComponent <Image>(); defaultColour = expandPanelImage.color; expandPanelImage.color = playerColour; }
// Use this for initialization void Start() { _TC = FindObjectOfType(typeof(TransitionController)) as TransitionController; //_PC = FindObjectOfType(typeof(playerController)) as playerController; StartCoroutine("introFase"); isPlayerAlive = true; txtVidas.text = "x" + vidas.ToString(); txtScore.text = score.ToString(); }
private void Start() { _weaponPanel = GameObject.Find("WeaponPanel").GetComponent <HorizontalLayoutGroup>(); _player = FindObjectOfType <PlayerController>(); _mainCanvas = GameObject.Find("Canvas"); _transitionController = GameObject.Find("TransitionController").GetComponent <TransitionController>(); GenerateWeaponsPanel(); _checkVictoryOrDefeatCoroutine = CheckVictoryOrDefeat(); StartCoroutine(_checkVictoryOrDefeatCoroutine); }
// Input? public void LoadLevel(int levelIndex) { p1Checkpoint = new CheckpointData(); p1Checkpoint.id = -1; p2Checkpoint = new CheckpointData(); p2Checkpoint.id = -1; StartCoroutine(TransitionController._GetInstance().Transition(levelIndex)); currentLevelIndex = levelIndex; }
private void Awake() { if (instance != null) { throw new Exception("You cannot have 2 ActivityManagers in your game!"); } instance = this; transitionController = new TransitionController(this); DontDestroyOnLoad(gameObject); }
void Start() { instance = this; if (startOpaque) { SetHeight (maxHeight); StartCoroutine ("OpenTransition"); } else { SetHeight (0); } }
public void SendToStart() { cameraObject.GetComponent <RectTransform>().position = cameraStartPosition; TransitionController tc = cameraObject.GetComponent <TransitionController>(); tc.changeRoom(Vector2.zero); player.transform.position = playerStartPosition; PlayerController pc = player.GetComponent <PlayerController>(); pc.state = PlayerController.PlayerStates.Idle; }
// Input? public void EndLevel() { //For now, return to main menu currentLevelIndex++; StartCoroutine(TransitionController._GetInstance().Transition(currentLevelIndex)); p1Checkpoint = new CheckpointData(); p1Checkpoint.id = -1; p2Checkpoint = new CheckpointData(); p2Checkpoint.id = -1; }
public override void OnInspectorGUI() { DrawDefaultInspector(); TransitionController myScript = (TransitionController)target; if (GUILayout.Button("Start Transition")) { myScript.StartTransition(() => Debug.Log("done")); } }
void Awake() { gm = GameObject.Find("GameManager").GetComponent <GameManager>(); player = GameObject.Find("Player"); pc = player.GetComponent <PlayerController>(); tc = GetComponent <TransitionController>(); locMenu = GameObject.Find("LocationsMenu"); locText = GameObject.Find("LocationsText"); locText.GetComponent <Text>().font = Resources.Load("Fonts/thefont") as Font; map = GameObject.Find("Map"); }
private void Awake() { if (!instance) { instance = this; } else { Destroy(gameObject); } }
void Awake() { if (TransitionController.instance && TransitionController.instance != this) { DestroyImmediate(this.gameObject); } else { TransitionController.instance = this; } }
private void Awake() { if (!MakeSingleton()) { return; } SaveManager = GetComponent <SaveManager>(); MusicController = GetComponent <BackgroundMusicController>(); TransitionController = GetComponent <TransitionController>(); EquipmentManager = GetComponent <EquipmentManager>(); }
public float pontosVidaAtual; //Quantidade de Vida Atual // Use this for initialization void Start() { _TC = FindObjectOfType(typeof(TransitionController)) as TransitionController; _GC = FindObjectOfType(typeof(GameController)) as GameController; _GC._PC = this; rbPlayer = GetComponent <Rigidbody2D>(); playerSr = GetComponent <SpriteRenderer>(); if (_GC.vidas_utilizadas > 0) { sombra.transform.position = posFinalSombra.position; } }
void Start() { tc = GetComponent <TransitionController>(); if (SceneManager.GetActiveScene().name == "start") { tc.LoadSceneFade("Tutorial"); teleportTarget = "startPoint"; } gameCheckpoints = new List <string>(); uc = GetComponent <UIController>(); }
private void Awake() { if (!instance) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Start() { playerStats = FindObjectOfType <PlayerStats>(); playerMovement = FindObjectOfType <AnnaPlayerMovement>(); anim = this.GetComponent <Animator>(); sporeSkill = GetComponent <SporesSkill>(); thornsSkill = GetComponent <ThornsSkill>(); sunflowerSeedSkill = GetComponent <SunflowerSeedProjectile>(); healOverTimer = healOverTimeDelay; //mainCameraAnimator = mainCamera.GetComponent<Animator>(); transitionController = GetComponent <TransitionController>(); }
protected override void OnStateEnter() { _rt.gameObject.GetComponent <Image>().enabled = true; StartCoroutine(_transitionData.Transition( (t) => { _rt.anchorMin = new Vector2(_rt.anchorMin.x, 1 - t); }, (complete) => { if (complete) { TransitionController.CompleteExitToScene(); } })); }
// Use this for initialization void Start() { if (hugDistance == 0) { hugDistance = .5f; } player = GameObject.Find("Player"); hugged = false; an = GetComponent <Animator>(); tc = GameObject.Find("GameManager").GetComponent <TextBoxController>(); inv = GameObject.Find("GameManager").GetComponent <Inventory>(); triggered = false; tr = GameObject.Find("GameManager").GetComponent <TransitionController>(); }
IEnumerator Change() { TC = GameObject.Find("TransitionControl(Clone)").GetComponent <TransitionController>(); player = GameObject.Find("player(Clone)"); GameControl.control.Freeze(); yield return(StartCoroutine(TC.transitionOut())); SceneManager.LoadScene(targetSceneName, LoadSceneMode.Single); GameControl.control.room = targetSceneName; GameControl.control.zone = zone; TC.newZone = zone; //GameControl.control.zone = zone; player.transform.position = new Vector3(targetX, targetY, 0); Debug.Log("Finished Prepping"); }
// Start is called before the first frame update void Start() { blackScreen.enabled = true; wormholeScreen.SetActive(true); wormholeScreen.GetComponent <PanelAlpha>().alpha = 0; wormholeScreen.SetActive(false); backgroundRainbow.SetActive(false); if (Instance == null) { Instance = this; } }
// Start is called before the first frame update void Start() { instance = this; PostProcessVolume ppv = GetComponent <PostProcessVolume>(); ppv.profile.TryGetSettings(out transitionEffect); transitionEffect.transitionTexture.value = transitionText; if (Application.isPlaying) { opacity = 1; cutoff = 1; fadeOut(); } }