void Update() { if (Input.GetKeyDown(KeyCode.Q)) { FadeManager.FadeIn(this, () => { Debug.Log("Done fading in"); }); } if (Input.GetKeyDown(KeyCode.Z)) { FadeManager.FadeOut(this, () => { Debug.Log("Done fading out"); }, 0.1f); } if (Input.GetKeyDown(KeyCode.E)) { var p = ParticleManager.GetParticle("BloodExplosion"); var pInstance = Instantiate(p); pInstance.transform.position = this.transform.position; _(5, () => { Destroy(pInstance); }); } if (Input.GetKeyDown(KeyCode.R)) { SoundManager.Play(this, "bic", this.transform.position); } if (Input.GetKeyDown(KeyCode.F)) { } if (Input.GetKeyDown(KeyCode.G)) { } if (Input.GetKeyDown(KeyCode.C)) { } }
void Start() { theFade = FindObjectOfType <FadeManager>(); thePlayer = FindObjectOfType <PlayerManager>(); theDM = FindObjectOfType <DialogueManager>(); theOrder = FindObjectOfType <OrderManager>(); }
////////////////////////////////////////////////// // Functions ////////////////////////////////////////////////// #region Functions void Awake() { // If this is the only object if this type set the instance // if it isn't then destroy the game object attached to this script if (instance == null) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(this); // Getting the music manager m_musicManager = GetComponent <MusicManager>(); // Getting the objective manager m_objectiveManager = GetComponent <ObjectiveManager>(); // Find the fader object, helps when changing scenes if (m_fadeInOut == null) { m_fadeInOut = GameObject.FindGameObjectWithTag("Fader").GetComponent <Image>(); } // Turn on the fade m_fadeInOut.gameObject.SetActive(true); }
// Use this for initialization void Start() { // example of loading csv file csv = CSVLoader.Instance; //TextAsset txt = csv.loadFile(1, 1, "Alocer_Dania"); unit = new Unit(); unit.readCharCSV(1, "Lancelot_Tartare"); //Debug.Log("step Name: " + BLance.getName()); // including fade and transition fm = FadeManager.Instance; // example of sound playing snd = SoundManager.Instance; //snd.PlayBGM(0); // example of random value util = UtilCommon.Instance; // example of using ClassBase cb = ClassBase.Instance; ps = ParameterScreen.Instance; ps.inactivateGuages(); mb = MessageBase.Instance; ms = MapScreen.Instance; //ms.showMap(); DontDestroyOnLoad(this.gameObject); }
// Start is called before the first frame update void Start() { FadeManager.FadeIn(0.5f); SetInstances(); masterData.LoadJsonFile(); SetNewTitle(); }
// Update is called once per frame void Update() { if (Input.GetKeyDown("return")) { FadeManager.FadeOut(2); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Return)) { FadeManager.FadeOut(2); } }
IEnumerator LoadWaitCoroutine() { yield return(new WaitForSeconds(0.5f)); thePlayer = FindObjectOfType <PlayerManager>(); bounds = FindObjectsOfType <Bound>(); theCamera = FindObjectOfType <CameraManager>(); theFade = FindObjectOfType <FadeManager>(); theMenu = FindObjectOfType <Menu>(); theDM = FindObjectOfType <DialogueManager>(); cam = FindObjectOfType <Camera>(); Color color = thePlayer.GetComponent <SpriteRenderer>().color; color.a = 1f; thePlayer.GetComponent <SpriteRenderer>().color = color; theCamera.target = GameObject.Find("Player"); theMenu.GetComponent <Canvas>().worldCamera = cam; // 씬 이동이 이루어져도 카메라 잃어버리지 않기 위해. theDM.GetComponent <Canvas>().worldCamera = cam; for (int i = 0; i < bounds.Length; i++) { if (bounds[i].boundName == thePlayer.currentMapName) { bounds[i].SetBound(); break; } } hpbar.SetActive(true); mpbar.SetActive(true); theFade.FadeIn(); }
void Start() { mainCamera = Camera.main; CellarCamera = GetComponent <Camera>(); mainListener = mainCamera.GetComponent <AudioListener>(); CellarListener = GetComponent <AudioListener>(); //초기화 mainListener.enabled = true; CellarListener.enabled = false; Fade_script = FindObjectOfType <FadeManager>(); actionController = mainCamera.GetComponent <ActionController_02_VER2>(); //플레이어 move playerController = GameObject.FindObjectOfType <Player_HJ>(); Side_Controller = GameObject.FindObjectOfType <FirstPersonCamera>(); _animator = playerModeling.GetComponent <Animator>(); // - 지하실문 스크립트, 문 외곽선을 위해 cellar_script = GameObject.FindObjectOfType <CellarDoorCollider>(); //게임매니저 gameMgr_script = GameObject.FindObjectOfType <GameMgr>(); }
void Start() { PlayerStats.DocumentsDepositedCount--; GetComponent <Button>().onClick.AddListener(() => { _conditionsMet = PaintManager.CheckAllFields(); if (_conditionsMet) { if (PlayerStats.DocumentsDepositedCount > 0) { PlayerStats.DocumentsDepositedCount--; PaintManager.ClearAllFields(); GameObject.Find("Contract").GetComponent <ContractInitiator>().GenerateNew(); } else { FadeManager.FadeOut(this, () => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }); } } else { SoundManager.Play(this, "error", Vector3.zero, 0.2f); StartCoroutine(WarnAWhile()); } }); }
public IEnumerator iExit() { FadeManager.FadeOut(uiPanel, 0.5f, true); Debug.Log(this.name + " Exit: " + Time.time); yield return(new WaitForSeconds(0.5f)); }
//TODO:: Have a Save and Load feature for player to adjust the fadeTranitionSpeed. void Awake() { if (Instance == null) { Instance = this; } }
// Use this for initialization void Start() { //フェードマネージャーを取得 fmana = GameObject.Find("Canvas").GetComponent <FadeManager>(); //フェードイン開始 fmana.FadeIn(); }
void Start() { Source = this.GetComponent <AudioSource>(); //フェードパネルとUIの親取得 FadeObj = GameObject.Find("FadePanel").GetComponent <FadeManager>(); }
void Start() { thePlayer = FindObjectOfType <Player_Movement>(); theCamera = FindObjectOfType <Main_Camera>(); theFade = FindObjectOfType <FadeManager>(); BGM = FindObjectOfType <BGMManager>(); }
// Start is called before the first frame update void Start() { FadeManager.FadeIn(2f); SetInstances(); SetScoreText(); }
private void FadeIn() { if (FadeInAfterTransition) { FadeManager.BeginFadeAllFromColor(FadeInDuration); } }
// Start is called before the first frame update void Start() { thePlayer = FindObjectOfType <PlayerManager>(); //다수의 객체 theCamera = FindObjectOfType <CameraManager>(); theOrder = FindObjectOfType <OrderManager2>(); theFade = FindObjectOfType <FadeManager>(); }
private void OnTestInputAllowed() { FadeManager.EnableCanvasGroup(_testElements, true); _joinButtons.ForEach(jb => { jb.Button.gameObject.SetActive(false); jb.Slider .OnValueChangedAsObservable() .Subscribe(val => { var b = jb.Slider.value != -1; jb.Text.text = ((TeamType)jb.Slider.value).ToString(); jb.Button.gameObject.SetActive(b); }).AddTo(jb.Slider.gameObject); jb.Button .OnClickAsObservable() .Where(_ => jb.Slider.value != -1) .Subscribe(_ => { var msg = new ORTCPEventParams(); msg.message = "{\"state\":10,\"station_id\":" + jb.Lane + ",\"team\":" + jb.Slider.value + "}"; _appStateBroker.ComReceivingStream.OnNext(msg); jb.Slider.gameObject.SetActive(false); jb.Button.gameObject.SetActive(false); }) .AddTo(jb.Button.gameObject); }); }
// Use this for initialization void Start() { theFade = FindObjectOfType <FadeManager>(); theAudio = FindObjectOfType <AudioManager>(); thePlayer = FindObjectOfType <PlayerManager>(); theGM = FindObjectOfType <GameManager>(); }
private void Awake() { if (TargetManager.Instance.PlottingTestMode) { return; } _appStateBroker = AppStateBroker.Instance; _testElements = TestElementsParent.GetComponent <CanvasGroup>(); var everyUpdate = Observable.EveryUpdate(); //debug binding everyUpdate .Select(_ => GameManager.TargetObject_External) .DistinctUntilChanged() .Subscribe(_ => Verbose = (GameManager.TargetObject_External & TargetObject.InputModule) == TargetObject.InputModule) .AddTo(gameObject); //snapbutton binding everyUpdate .Where(_ => Input.GetKeyDown(KeyCode.Alpha0)) .Select(_ => new Unit()) .Subscribe(_ => _appStateBroker.SnapButonObservable.OnNext(_)) .AddTo(gameObject); FadeManager.DisableCanvasGroup(_testElements, true); }
private void OnTriggerEnter(Collider collider) { if (collider.GetComponent <Tag>().HasTag(TagType.Player)) { FadeManager.FadeOut(1); } }
//Player死亡時に呼び出す関数 public void PlayerDead() { Debug.Log("dead!"); Time.timeScale = 0f; //ゲーム内の時間の流れを停止(これ以降はInvokeとか使えなくなるので注意、使いたい場合はコルーチンを利用する) FadeManager.FadeOut(untilReloadTime, 0, ReloadScene, true); }
private void Update() { if (Input.GetMouseButtonDown(0)) { FadeManager.FadeOut(1); } }
void Scene() { if (Input.GetKeyDown("joystick button 7")) { FadeManager.FadeOut("Title"); } }
// Start is called before the first frame update void Start() { global = Global.GetInstance(); fadeManager = GetComponent <FadeManager>(); fadeManager.FadeInComplete += EnableInput; fadeManager.FadeIn(); gameEnd = GameObject.Find("GameEnding").gameObject; gameEnd.SetActive(false); for (int i = 1; i < 5; i++) { map[i - 1] = GameObject.Find("Map_0" + i); enemyGroup[i - 1] = map[i - 1].transform.GetChild(3).gameObject; if (i - 1 != 0) { map[i - 1].SetActive(false); enemyGroup[i - 1].SetActive(false); } } mainCamera = Camera.main.gameObject; subCamera = GameObject.Find("SubCamera").gameObject; subCamera.SetActive(false); timeline = GameObject.Find("TimeLine").gameObject; bomb = Resources.Load <GameObject>("Prefab/nuclearBomb"); timeline.SetActive(false); }
public void OnEnter() { // ORTCPMultiServer.Instance.DisconnectAllClients(); FadeManager.FadeIn(UiPanel, 0.5f); // if (GameManager.Instance.Is_Automation_Test_Build) // StartCoroutine(iAutomatedTest()); }
//------------------------------------------------------------------------------------------ // Start //------------------------------------------------------------------------------------------ private void Start() { Data.time = 100; player = GameObject.Find(Player.NAME); playerController = player.GetComponent <PlayerController>(); if (Data.stage_number > 0) { var doors = doorWrapper.GetComponentsInChildren <DoorToStage>(); foreach (var door in doors) { if (door.GetStageNumber() == Data.stage_number) { player.transform.position = door.transform.position; GameObject.Find(Common.Camera.CONTROLLER).GetComponent <CameraController>().ResetCameraPos(player.transform.position); break; } } } GameObject go = GameObject.Find(PauseManager.NAME); if (!go) { Debug.Log("PauseManagerをシーンに追加してください"); } pauseManager = go.GetComponent <PauseManager>(); // シーン開始時にフェードインする FadeManager.FadeIn(0.01f); wipeCamera = GameObject.Find(Common.Camera.MAIN_CAMERA).GetComponent <WipeCamera>(); wipeCamera.StartFadeIn(player.transform.position, 1.0f); waitTime = 1.0f; }
private void Start() { FadeManager.AssertIsInitialized(); fadeControl = FadeManager.Instance; // If our FadeManager is missing, or if we're on the HoloLens // Remove this component. #if UNITY_2017_2_OR_NEWER if (!XRDevice.isPresent || #if UNITY_WSA !HolographicSettings.IsDisplayOpaque || #endif fadeControl == null) #else if (VRDevice.isPresent || fadeControl == null) #endif { Destroy(this); return; } if (teleportMarker != null) { teleportMarker = Instantiate(teleportMarker); teleportMarker.SetActive(false); animationController = teleportMarker.GetComponentInChildren <Animator>(); if (animationController != null) { animationController.StopPlayback(); } } }
IEnumerator Run() { greg.color = Color.white; player.enabled = false; for (int i = 0; i < 30; i++) { yield return(null); } DialogueTrigger trigger = GetComponent <DialogueTrigger>(); trigger.Trigger("cutscene"); yield return(new WaitUntil(() => trigger.GetIndex > 3)); trigger.pause = true; FadeManager.FadeToColor(Color.black, 120); for (int i = 0; i < 110; i++) { yield return(null); } FadeManager.FadeToColor(Color.clear, 30); Stairs.spawn = new Vector3(-1.6f, 11.2f); SceneManager.LoadScene("Floor 3"); }
void Start() { _OM = FindObjectOfType <OrderManager>(); _PM = FindObjectOfType <PlayManager>(); _DM = FindObjectOfType <DialogManager>(); _FM = FindObjectOfType <FadeManager>(); }
public static void registerFadeManager(GameObject fadeManagerGO) { fadeManager = fadeManagerGO.GetComponent<FadeManager> (); }
// Use this for initialization void Start() { nets = GetComponent<NetworkScript>(); stateScene = LANConnexionState.LOADING; hitNet = new Dictionary<GameObject, NetworkPlayer>(); hitNetClient = new Dictionary<GameObject, CublastPlayer>(); previousLenghtConnected = 0; networkStarted = false; actualColor = 0f; sens = 1f; time = 0f; alphaDescription = 0f; locked = false; somethingSelected = false; isReady = false; countForTimeEnd = 0f; tex = new Dictionary<string, Texture2D>(); tex.Add("mode0", (Texture2D) Resources.Load("LANFFA")); tex.Add("mode1", (Texture2D) Resources.Load("LANScoreTournament")); tex.Add("mode2", (Texture2D) Resources.Load("LANPointTournament")); tex.Add("mode3", (Texture2D) Resources.Load("LANElimination")); tex.Add("black", (Texture2D) Resources.Load("black")); if(LANManager.Instance.isCreator) { profileAlreadyGetted.Add(cubePlayers.transform.GetChild(0).gameObject); } fm = GetComponent<FadeManager>(); }
// Use this for initialization void Start() { //Load if(!LoadManager.Instance.alreadyLoaded) TextManager.Instance.LoadTextFile(); //if(!LoadManager.Instance.alreadyLoaded) LoadManager.Instance.Loading(); //TextManager.Instance.LoadTextFile(); fm = gameObject.GetComponent<FadeManager>(); this.updat = UpdateWait; sign = -1f; Camera.main.transform.eulerAngles = new Vector3(66f, 32.5f, 0f); trueSpeedUp = speedUp; trueSpeedTang = 200; time = 0f; enterPushed = false; goToBack = new Dictionary<string, GameObject>(); inPlace = false; signPressStart = 1f; alphaPressStart = 0f; pressStart = (Texture2D) Resources.Load("PressStart"); GUITextTexture = (Texture2D) Resources.Load("GUIBar"); Black = (Texture2D) Resources.Load("black"); alphaGUIImage = 0f; timeSelect = 0f; iFade = false; selection = ""; sousChoixEnPlace = false; DisplayLabel = false; error = false; alphaError = 0f; timeBack = 0f; forbiddenTouchGUI = ""; }
///<summary> 初期化 </summary> void Awake() { _fadeManager = GameObject.Find("FadeCanvas"). GetComponent<FadeManager>(); }
/**************************************************************************************************/ /*! * \fn void Release() * 解放 * \date 2015. 2.12(Thu) * \author Masayoshi.Matsuyama@Donuts */ /**************************************************************************************************/ public void Release() { if(instance != null) { Destroy(instance.gameObject); instance = null; } }
// Use this for initialization void Start () { fm = FadeManager.Create(); }
/**************************************************************************************************/ /*! * \fn void Awake() * 起動時処理 * \date 2015. 2.12(Thu) * \author Masayoshi.Matsuyama@Donuts */ /**************************************************************************************************/ void Awake() { if(instance != null) { // 既にある場合は自身を破棄 Destroy(this.gameObject); } else{ instance = this; DontDestroyOnLoad(this.gameObject); } gameObject.SetActive(false); // デフォルトは非アクティブ }
// Use this for initialization void Start() { //TestShort(); tex = new Dictionary<string, Texture2D>(); tex.Add("join0", (Texture2D) Resources.Load("LANCreate")); tex.Add("join1", (Texture2D) Resources.Load("LANJoin")); tex.Add("option0", (Texture2D) Resources.Load("LANFFA")); tex.Add("option1", (Texture2D) Resources.Load("LANScoreTournament")); tex.Add("option2", (Texture2D) Resources.Load("LANPointTournament")); tex.Add("option3", (Texture2D) Resources.Load("LANElimination")); tex.Add("black", (Texture2D) Resources.Load("black")); tex.Add("cache", (Texture2D) Resources.Load("CacheNameWheel")); sens = -1f; sensShininess = -1f; sensRotationCam = 1f; optionJoinSelected = -1; optionSelected = -1; finalSelected = -1; alphaClign = 1f; stateLAN = LANManager.Instance.rejectedByServer ? StateLAN.ERROR : StateLAN.JOINCHOOSE; LANManager.Instance.init(); alphaOption = 0f; alphaTitle = 0f; alphaDisappearTitle = 1f; fm = GetComponent<FadeManager>(); ipValue = ""; shininess = 0f; error = false; timeFade = 0f; alreadyFaded = false; baseMaterialColor = selectedMaterial.color; rotationBase = ring.transform.rotation; audioS.Play(); StartCoroutine(soundVolume(true)); }