Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var manos : GameObject;
- var arma: GameObject;
- var escopeta: GameObject;
- var lanzapepos: GameObject;
- var arma2 : GameObject;
- var mira1 : GameObject;
- var mira2 : GameObject;
- var mira3 : GameObject;
- var mira4: GameObject;
- var miralp: GameObject;
- var anim: Animation;
- var anim2: Animation;
- var anim3: Animation;
- var anim4: Animation;
- var Disparador: GameObject;
- var Disparador2: GameObject;
- var DisparadorPepos: GameObject;
- var swich: int = 1;
- var swiches: int = 1;
- var canshootpistola: GameObject;
- var canshootescopeta: GameObject;
- var canshootlanzapepos: GameObject;
- private var blur : TiltShiftHdr;
- blur = GameObject.Find("MainCamera").GetComponent(TiltShiftHdr);
- var cameras: Camera;
- function Start() {
- manos.SetActive(true);
- arma.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- //mira1.SetActive (true);
- //mira2.SetActive (false);
- //mira3.SetActive (false);
- //mira4.SetActive (false);
- // Disparador.SetActive(false);
- // Disparador2.SetActive(false);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 1;
- swiches = 2;
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- }
- function Update() {
- if (Input.GetKeyDown("1")) {
- //if(swich ==1){
- manos.SetActive(true);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(true);
- mira2.SetActive(false);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim2.Play("aparecermanos");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(false);
- // Disparador2.SetActive(false);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 2;
- // }
- }
- if (Input.GetKeyDown("1")) {
- // if(swich ==1){
- manos.SetActive(true);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(true);
- mira2.SetActive(false);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim2.Play("aparecermanos");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(false);
- // Disparador2.SetActive(false);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 2;
- // }
- }
- if (Input.GetKeyDown("2")) {
- // if(swich ==2){
- manos.SetActive(false);
- arma.SetActive(true);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim.Play("Aparecearma");
- canshootpistola.GetComponent(disparoyrecarga).enabled = true;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(true);
- // Disparador2.SetActive(false);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 1;
- // }
- }
- if (Input.GetKeyDown("2")) {
- // if(swich ==1){
- manos.SetActive(false);
- arma.SetActive(true);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim.Play("Aparecearma");
- canshootpistola.GetComponent(disparoyrecarga).enabled = true;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(true);
- // Disparador2.SetActive(false);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 1;
- // }
- }
- if (Input.GetKeyDown("3")) {
- // if (swiches == 1) {
- manos.SetActive(false);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(true);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim3.Play("aparecescopeta");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = true;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(false);
- // Disparador2.SetActive(true);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 3;
- //}
- }
- if (Input.GetKeyDown("3")) {
- //if (swiches == 2) {
- manos.SetActive(false);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(true);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim3.Play("aparecescopeta");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = true;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- //Disparador.SetActive(false);
- // Disparador2.SetActive(true);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- //swich = 3;
- // }
- }
- else
- if (Input.GetKeyDown("3")) {
- //if (swiches == 3) {
- manos.SetActive(false);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(true);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim3.Play("aparecescopeta");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = true;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(false);
- // Disparador2.SetActive(true);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 3;
- //}
- }
- if (Input.GetKeyDown("4")) {
- //if(swich ==1){
- manos.SetActive(false);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(true);
- mira1.SetActive(false);
- mira2.SetActive(false);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(true);
- anim4.Play("aparecelanzapepos");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = true;
- // Disparador.SetActive(false);
- //Disparador2.SetActive(false);
- //DisparadorPepos.SetActive(true);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- // swich = 2;
- // }
- }
- if (Input.GetAxis("Mouse ScrollWheel") > 0f ){
- if (swich == 1) {
- manos.SetActive(false);
- arma.SetActive(true);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim.Play("Aparecearma");
- canshootpistola.GetComponent(disparoyrecarga).enabled = true;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- /// Disparador.SetActive(true);
- /// Disparador2.SetActive(false);
- ///DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 2;
- }
- else
- if (swich == 2) {
- manos.SetActive(false);
- arma.SetActive(false);
- escopeta.SetActive(true);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim3.Play("aparecescopeta");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = true;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- // Disparador.SetActive(false);
- // Disparador2.SetActive(true);
- // DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 3;
- }
- else if (swich == 3) {
- manos.SetActive(false);
- arma.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(true);
- mira1.SetActive(false);
- mira2.SetActive(false);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(true);
- anim4.Play("aparecelanzapepos");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = true;
- Disparador.SetActive(false);
- Disparador2.SetActive(false);
- DisparadorPepos.SetActive(true);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 4;
- }
- else
- if (swich == 4) {
- manos.SetActive(true);
- arma.SetActive(false);
- arma2.SetActive(false);
- escopeta.SetActive(false);
- lanzapepos.SetActive(false);
- mira1.SetActive(false);
- mira2.SetActive(true);
- mira3.SetActive(false);
- mira4.SetActive(false);
- miralp.SetActive(false);
- anim2.Play("aparecermanos");
- canshootpistola.GetComponent(disparoyrecarga).enabled = false;
- canshootescopeta.GetComponent(escopeta).enabled = false;
- canshootlanzapepos.GetComponent(lanzapepos).enabled = false;
- Disparador.SetActive(false);
- Disparador2.SetActive(false);
- DisparadorPepos.SetActive(false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 1;
- }
- }
- if (Input.GetAxis("Mouse ScrollWheel") < 0f ){
- if(swich >=2){
- manos.SetActive (false);
- arma.SetActive (true);
- mira1.SetActive (false);
- mira2.SetActive (true);
- mira3.SetActive (false);
- mira4.SetActive (false);
- anim.Play("Aparecearma");
- Disparador.SetActive (true);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 0;
- }
- else
- if(swich <=1){
- manos.SetActive (true);
- arma.SetActive (false);
- arma2.SetActive (false);
- mira1.SetActive (true);
- mira2.SetActive (false);
- mira3.SetActive (false);
- mira4.SetActive (false);
- anim2.Play("aparecermanos");
- Disparador.SetActive (false);
- cameras.GetComponent.<Camera>().fieldOfView = 60;
- blur.enabled = false;
- swich = 2;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment