// Use this for initialization void Start() { messageManager = MessageManager.GetComponent<MessageManager>(); /* levelData = GameData.getLevelData(previousScene); timeText.text = levelData.finishTime+""; totalCollectiblesText.text = levelData.collectibles.Count+""; int actualCollectibles = 0; foreach (string collId in levelData.collectibles) { if(GameData.AlreadyCollected(collId)) { actualCollectibles++; } } actualCollectiblesText.text = actualCollectibles + ""; */ fader = GetComponent<SceneFade>(); fader.nextScene = nextScene; fader.StartScene(); Invoke("StartMessages", fader.fadeSpeed * 2); }
// Use this for initialization void Start() { // ステージセレクトを訪れたかどうか保存 SaveData.Instance.mEventDoneFlag.mAlreadyVisitStageSelect = true; SaveData.Instance.Save(); mFade = FindObjectOfType <SceneFade>(); mPlayer = FindObjectOfType <Player>(); mTransition = FindObjectOfType <StageTransition>(); mStageSelectScroll = FindObjectOfType <StageSelectScroll>(); mPause = FindObjectOfType <Pause>(); mGoalBlack = FindObjectOfType <GoalBlackCurtain>(); Time.timeScale = 1.0f; mPause.pauseEvent.Invoke(); //ゲーム進行のコルーチンを開始 // mFromTitle = cameraMove.fromTitle; cameraMove.fromTitle = false; //タイトル用の演出のコルーチン if (Area.sBeforeAreaNumber == 0 || mFromTitle) { StartCoroutine(StageSelectMain_FromTitle()); } //ステージからの演出のコルーチン else { StartCoroutine(StageSelectMain_FromStage()); } }
void Start() { _spawner = GetComponent <Spawn>(); _pointSpawner = GetComponent <SpawnPoints>(); _scoreHandler = GetComponent <ScoreGUI>(); _sceneFade = FindObjectOfType <SceneFade>(); if (_sceneFade != null) { _sceneFade.FadeOut(); } InputManager.Instance.Swipe += OnSwipe; if (PositiveSound != null) { PositiveSound = GameObject.Find("Positive").GetComponent <AudioSource>(); } if (NeutralSound != null) { NeutralSound = GameObject.Find("Netural").GetComponent <AudioSource>(); } if (NegativeSound != null) { NegativeSound = GameObject.Find("Negative").GetComponent <AudioSource>(); } }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.A)) { SceneFade.FadeOut(1); } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } seed = Random.Range(0f, 10000f); underworldMap.size = new Vector3Int(chunkSize.x, chunkSize.y * chunksCount, 0); underworldOres.size = new Vector3Int(chunkSize.x, chunkSize.y * chunksCount, 0); underworldLadders.size = new Vector3Int(chunkSize.x, chunkSize.y * chunksCount, 0); underworldBackground.size = new Vector3Int(chunkSize.x, chunkSize.y * chunksCount, 0); GenerateOverworld(); GenerateWorldChunk(); LoadNearbyChunks(); sceneFade = FindObjectOfType <SceneFade>(); sceneFade.BeginFade(-1); playerRB.bodyType = RigidbodyType2D.Dynamic; }
void Start() { fuelCollected = 0; audioSource = GetComponent <AudioSource>(); sceneFade = GetComponent <SceneFade>(); sceneFade.StartFade(SceneFade.Direction.In, 0.5f); }
public SceneManager() { fade = new SceneFade(); currentScene = null; currentType = E_Scene.NONE; isFade = false; }
void Awake() { _player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <PlayerControl> (); _sceneFade = GameObject.FindGameObjectWithTag(Tags.sceneFader).GetComponent <SceneFade> (); _battleController = GameObject.FindGameObjectWithTag(Tags.battle).GetComponent <BattleControl> (); _levels = new List <LevelGateControl> (); }
IEnumerator WaitCoroutine() { yield return(new WaitForSeconds(6.0f)); fadeScreen = GameObject.FindObjectOfType <SceneFade>(); Debug.Log("Begin EndScene"); fadeScreen.BeginTransition(fadeScreen.Scenename); }
// Update is called once per frame void Update() { nextSceneCount -= Time.deltaTime; if (nextSceneCount < 0) { SceneFade.FadeOut(2); } }
void Awake() { _player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <PlayerControl> (); _panel = GetComponent <UIPanel> (); _fader = GameObject.FindGameObjectWithTag(Tags.sceneFader).GetComponent <SceneFade> (); _gamerController = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <GameController> (); _battleController = GameObject.FindGameObjectWithTag(Tags.battle).GetComponent <BattleControl> (); }
SceneFade mSceneFade; //黒フェードに使う // Use this for initialization void Start() { mStageTransition = FindObjectOfType <StageTransition>(); mSceneFade = FindObjectOfType <SceneFade>(); //オープニングのコルーチンを開始する StartCoroutine(OpeningCoroutine()); }
void Awake() { if (!Instance) { Instance = this; } else { Destroy(gameObject); } }
public override void OnEnter() { if (fadeIn.Value) { SceneFade.FadeInStatic(OnFadeComplete); } else { SceneFade.FadeOutStatic(OnFadeComplete); } }
private void Awake() { _collider = GetComponent <Collider2D> (); _spriteRenderer = GetComponent <SpriteRenderer> (); _spriteRenderer.enabled = true; s_instance = this; OnUpdateAlpha(0f); _collider.enabled = false; }
void Awake() { if (s_instance == null) { s_instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this.gameObject); } }
// Use this for initialization void Start() { effect.transform.localPosition = new Vector3(-350, 0, 0); result.transform.localPosition = new Vector3(-350, 0, 0); winname.transform.localPosition = new Vector3(650, -30, 0); win.enabled = false; winEffe.enabled = false; minScale = winEffe.transform.localScale; Sfade = maneger.GetComponent <SceneFade>(); ADir = this.GetComponent <AnimtorDirector>(); }
void Awake() { _player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <PlayerControl> (); _gameController = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <GameController> (); _sceneFader = GameObject.FindGameObjectWithTag(Tags.sceneFader).GetComponent <SceneFade> (); _dynamicTextAdmin = GetComponentInChildren <DynamicTextAdmin> (); _enemyCard = new List <ConcreteCard> (); _cardFactory = CardFactory.GetCardFactory(); _enemyAI = GetComponent <CardAIScript> (); _backgroundTextureTable = new Dictionary <LevelInfo, Texture> (); _trophyCards = new List <ConcreteCard> (); }
private void MakeSingleton() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
// There is only one instance of this and will appear in every scene private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); return; } DontDestroyOnLoad(this.gameObject); }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); return; } ActiveSceneName = SceneManager.GetActiveScene().name; }
// Use this for initialization void Start() { if (this.GetComponent <AudioSource>() != null) { audio = this.GetComponent <AudioSource>(); } SMana = manager.GetComponent <SceneMane>(); SFade = manager.GetComponent <SceneFade>(); TAnim = this.GetComponent <TextAnim>(); datums = GameObject.Find("GameSystem").GetComponent <DataRetention>(); SFade.ImageAlpha = 1; }
// Use this for initialization void Start() { if (this.GetComponent <AudioSource>() != null) { audio = this.GetComponent <AudioSource>(); } SMana = manager.GetComponent <SceneMane>(); SFadeScene = manager.GetComponent <SceneFade>(); SFadeBack = this.GetComponent <SceneFade>(); SFadeScene.ImageAlpha = 1; SFadeBack.ImageAlpha = 0; SFadeBack.FFlag = true; }
private void Awake() { this.fader = GetComponent <SceneFade>(); // Ensure that if the instance of GameManager is not set, it is set to this instance. if (instance == null) { instance = this; } //If it is set, destroy this instance so there aren't two else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Awake() { if (_jsonDataFile != null) { _allInfoDict = MiniJSON.Json.Deserialize(_jsonDataFile.text) as Dictionary <string, object>; } _uniqueIdentityString = transform.parent.name + name + GetType().ToString(); _player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <PlayerControl> (); // _starCounter = GameObject.FindGameObjectWithTag (Tags.starCounter).GetComponentInChildren<StarCounterControl> (); _sceneFade = GameObject.FindGameObjectWithTag(Tags.sceneFader).GetComponent <SceneFade> (); _battleController = GameObject.FindGameObjectWithTag(Tags.battle).GetComponent <BattleControl> (); //_battleController.gameObject.SetActive (false); _maps = new List <MapLayerControl> (); _levels = new List <LevelGateControl> (); _pathPoints = new List <PathPointControl> (); }
// Update is called once per frame void Update() { step_timer += Time.deltaTime; // 経過時間を取得. Now_Trash = getTags_Obj("Trash"); Now_Living = getTags_Obj("Living"); // (1)ステップ変化時のみ. if (next_step != STEP.NONE) { step = next_step; // 現状に反映. next_step = STEP.NONE; // 変化待ち. step_timer = 0.0f; // 経過時間リセット. switch (step) { case STEP.SET: next_step = STEP.PLAY; // 次はPLAYステップに. break; } } // (2)繰り返し実行. switch (step) { case STEP.PLAY: //Player操作 if (limitTime < step_timer) { next_step = STEP.GAMEOVER; } if (Now_Trash <= leftOver) { next_step = STEP.FINISH; } break; case STEP.FINISH: SceneFade.FadeOut(5); break; case STEP.GAMEOVER: SceneFade.FadeOut(5); break; } }
void Start() { sf = FindObjectOfType <SceneFade>(); changeSceneFlg = false; endGameFlg = false; pauseFlg = false; if (titleScene == null) { Debug.LogError("タイトルシーンが指定されていません"); } if (stageSelectScene == null) { Debug.LogError("ステージセレクトシーンが指定されていません"); } result = GetComponent <Result>(); }
private void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "MissionLiving") { IrukaTime.count = false; KameTime.count = false; RuteAreaSet.judg = false; if (MissionTuchJudg.Trashnum <= TrashRecovery) { //なんかの値に変化させてシーンの読み込みを変えさせる(時間制限で) SceneFade.FadeOut(5); //ミッションクリアシーンへ移動 Debug.Log("成功!!!"); } else { SceneFade.FadeOut(5); //ミッション失敗シーンへ移動 Debug.Log("失敗..."); } } }
void Start() { if (sceneFadeScript == null) { sceneFadeScript = GlobalVariables.globVarScript.GetComponent <SceneFade>(); } newCornerPos = cornerPos.position; if (iniDelay < sceneFadeScript.fadeTime) { iniDelay = sceneFadeScript.fadeTime; } AdjustLevelComplete(); // Check if level has already been completed. (bool) MakeSilverEggsAppear(); // Make the silver eggs already found appear in the egg panel. AdjustSilverEggCount(); // Silver egg text. AdjustGoldenEggCount(); // Golden egg text. AdjustTotalEggsFound(); // Total eggs found = to what it was last time the scene was openned. // Not sure if this is needed. UpdateEggsString(); iniSeq = true; //CheckIfLevelComplete(); // if "thisSceneName" level complete screen was not played, check to see if its complete. (probably for when the players last eggs are from the puzzle) audioSceneGenScript = GameObject.Find("Audio").GetComponent <AudioSceneGeneral>(); }
void Update() { //フラグ有効なら毎フレームフェードイン/アウト処理 if (isFadeIn) { //経過時間から透明度計算 alpha -= Time.deltaTime / fadeTime; //フェードイン終了判定 if (alpha <= 0.0f) { isFadeIn = false; alpha = 0.0f; fadeCanvas.enabled = false; } //フェード用Imageの透明度設定 fadeImage.color = new Color(0.0f, 0.0f, 0.0f, alpha); } else if (isFadeOut) { //経過時間から透明度計算 alpha += Time.deltaTime / fadeTime; //フェードアウト終了判定 if (alpha >= 1.0f) { isFadeOut = false; alpha = 1.0f; //次のシーンへ遷移 SceneFade.FadeOut(5); //リザルトに遷移するのにここをいじりました。不具合があれば修正宜しくお願いします } //フェード用Imageの透明度設定 fadeImage.color = new Color(0.0f, 0.0f, 0.0f, alpha); } }
void Update() { if (SceneCount == 0) { life -= Time.deltaTime; if (life < 0) { TextTransparence(); SceneCount = 1; life = 10.0f; TextDisplay_1(); } } if (SceneCount == 1) { life -= Time.deltaTime; if (life < 0) { TextTransparence_1(); SceneCount = 2; life = 10.0f; TextDisplay_2(); } } if (SceneCount == 2) { life -= Time.deltaTime; if (life < 0) { Debug.Log("ResultFin"); scene -= Time.deltaTime; } if (scene < 0) { SceneFade.FadeOut(0); } } }
void Start() { waterSound = GameObject.Find("WaterSound").GetComponent<AudioSource>(); waterSound.enabled = false; vig = Camera.main.GetComponent<Vignetting>(); spirit = Transform.FindObjectOfType<SpiritMovement>().gameObject.transform; anim = GetComponentInChildren<Animator>(); charGfx = anim.gameObject.transform; pMotor = GetComponent<CharacterMotor>(); pMove = GetComponent<PlayerMovement>(); startFallspeed = pMotor.movement.maxFallSpeed; pSwitch = GetComponent<PlayerSwitch>(); actionHandler = GetComponent<ActionHandler>(); if(actionHandler) { actionHandler.TakeAction += Floater; } sceneFade = Camera.main.GetComponent<SceneFade>(); leftCol.GetComponent<Collider>().enabled=false; }
void Awake() { fader = GetComponent<SceneFade>(); }