void Update () {
		if(Input.GetMouseButtonUp(0)) {
			if(guiTextures[0].HitTest(Input.mousePosition)) {
				StartShake();
				StartCoroutine( WaitForTexture(guiTextures[0], 0.20f) );
			}
			if(guiTextures[1].HitTest(Input.mousePosition)) {
				cameraShake.StopShake();
				objectShake.StopShake();
				StartCoroutine( WaitForTexture(guiTextures[1], 0.20f) );
			}

			if(guiTextures[2].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.standard;
				ResetTextures(2);
			}
			if(guiTextures[3].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.rumble;
				ResetTextures(3);
			}
			if(guiTextures[4].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.explosion;
				ResetTextures(4);
			}
			if(guiTextures[5].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.earthquake;
				ResetTextures(5);
			}
			if(guiTextures[6].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.custom;
				ResetTextures(6);
				ToggleValueObjects(true);
			}
			if(guiTextures[7].HitTest(Input.mousePosition)) {
				shakeType = Shake.ShakeType.random;
				ResetTextures(7);
			}
			if(guiTextures[8].HitTest(Input.mousePosition)) {
				StartCoroutine( WaitForTexture(guiTextures[8], 0.05f) );
				shakeAmount += shakeIncrement;
				if(shakeAmount > 100) shakeAmount = shakeIncrement;
				valueText.text = shakeAmount+"%";
			}
			if(guiTextures[9].HitTest(Input.mousePosition)) {
				StartCoroutine( WaitForTexture(guiTextures[9], 0.15f) );
				addDecay = !addDecay;
				decayText.text = addDecay == true ? "DELAY" : "IMMEDIATE";
			}
			
			if(controlTextures[0].HitTest(Input.mousePosition)) {
				targetIsCamera = true;
				ToggleShakeTarget(0);
			}
			if(controlTextures[1].HitTest(Input.mousePosition)) {
				targetIsCamera = false;
				ToggleShakeTarget(1);
			}
		}
	}
Exemple #2
0
	void Update () {
		targetIsCamera = true;
		shakeType = Shake.ShakeType.explosion;
	}
	void Update () {
		targetIsCamera = true;
		shakeType = Shake.ShakeType.explosion;
		target = GameObject.FindWithTag ("Player").transform;
		if (GameObject.FindGameObjectWithTag ("Ragdoll") != null) {
			target = GameObject.FindGameObjectWithTag ("Ragdoll").transform;
		}
		distance = Vector3.Distance (enemyTransform.position, target.position);

	}