// Use this for initialization void Start() { verRot = transform.parent; horRot = GetComponent <Transform>(); GManagerObject = GameObject.FindGameObjectWithTag("GameManager"); glitch = this.transform.GetComponent <GlitchFx>(); }
// Update is called once per frame void Update() { if (wasLocked == true && (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D))) { cameraPos = getCamera.GetComponent <look>(); cameraPosF = cameraPos.Camerafoward; Vector3 tmp = GameObject.FindGameObjectWithTag("Player").transform.position; Debug.Log(tmp); beforeTelport = tmp; Instantiate(teleBall, new Vector3(cameraPosF.x, cameraPosF.y, cameraPosF.z), Quaternion.identity); } if (wasLocked == false && Input.GetMouseButtonDown(0)) { MouseLock(); } if (wasLocked == true && Input.GetKeyDown(KeyCode.Escape)) { MouseLockCancel(); } if (gameGoal == true) { time += Time.deltaTime; if (time >= 1.0f) { glitch = getCamera.GetComponent <GlitchFx>(); glitch.intensity += 0.001f; } } }
void Start() { GameOverScene.SetActive(false); MailComeFlag = false; RemainTime = DataManager.Instance.RemainTime; HP = DataManager.Instance.HP; MaxHP = DataManager.Instance.HP; /* * InputManager.OnBeginSwipe * .Take(5) * .Subscribe(x => { * Debug.Log("pos = " + x); * }).AddTo(this); */ VirusRemainTimer = UnityEngine.Random.Range(8, 12); EmailRemainTime = UnityEngine.Random.Range(3, 4); BadMailNow = false; GF = GetComponent <GlitchFx>(); GF.intensity = 0; InputManager.OnPress.Subscribe(_ => GimmickManager.Instance.SoundStart(13)).AddTo(this); PressHitDecision(); GoodMailAnim.SetBool("MailAinmBool", true); BadMailAnim.SetBool("MailAinmBool", true); VirusMemoryAttackDamage.Subscribe(x => VirusAttackToPC()); StartCoroutine(InitInternal()); }
// Use this for initialization void Start() { NuitrackManager.DepthSensor.OnUpdateEvent += HandleOnDepthSensorUpdateEvent; // NuitrackManager.ColorSensor.OnUpdateEvent += HandleOnColorSensorUpdateEvent; feedback = FindObjectOfType <Feedback>(); initColor = feedback.color.r; glitch = FindObjectOfType <GlitchFx>(); Cursor.visible = false; }
//public void Reset() //{ // glitchAmountTemp = glitchAmount; // shiftMagTemp = shiftMag; //} void Start() { instance = this; _glitchShader = Shader.Find("Hidden/GlitchFX/GlitchFX_Shift"); _glitchMat = new Material(_glitchShader); _glitchMat.SetTexture("_GlitchMap", blockTexture); //Reset(); Invoke("UpdateRandom", 0.25f); }
//初期化 void Start() { fallPrev = false; playerObj = Instantiate(parameter.PlayerObj, transform.position, transform.rotation).gameObject; fx = Camera.main.gameObject.GetComponent <GlitchFx>(); //プレイヤーにイベント用のスクリプトをアタッチ playerObj.AddComponent <PlayerOnEvent>(); PlayerObjectManager.Instance.init(); if (parameter.SpeedEffectObject != null) { speedEffectObject = Instantiate(parameter.SpeedEffectObject, new Vector3(100, 100, -500), parameter.SpeedEffectObject.transform.rotation); controller = new PlayerController(parameter, speedEffectObject); return; } controller = new PlayerController(parameter); }
// Use this for initialization void Start() { if (PlayerPrefs.HasKey("DEF")) { HP = PlayerPrefs.GetFloat("DEF"); } else { PlayerPrefs.SetFloat("DEF", HP); } MaxHp = HP; mat = Model.GetComponent <Renderer>().material; startColor = mat.color; GameRuleManager.I.Initialize += Init; glitch = Camera.main.GetComponent <GlitchFx>(); }
// Use this for initialization void Start() { state = State.awake; if (astro == null) { astro = GameObject.Find("Asto_kun"); } glitch = GetComponent <GlitchFx>(); for (int i = 0; i < 9; i++) { GameObject obj = GameObject.Find("heap_button_" + i); heapButtons[i] = new heapButton(obj, false); } text = GameObject.Find("Text").GetComponent <Text>(); text_01 = GameObject.Find("Text_01").GetComponent <Text>(); sounds = GetComponents <AudioSource>(); inputField.gameObject.SetActive(false); panelImage = GameObject.Find("Panel").GetComponent <Image>(); panelImage.gameObject.SetActive(false); title = GameObject.Find("title"); name = GameObject.Find("name"); title.SetActive(false); name.SetActive(false); }