daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     metekUstreljen() : void {
  2.             console.log(this.rotacijaTanka);
  3.             console.log("enemy:" + this._SCENE.getObjectByName("enemyTankec").position.x);
  4.             if (this.rotacijaTanka >= 0) {
  5.                     this.tween = new TWEEN.Tween(this._SCENE.getObjectByName("nasMetek").position).to({ x: this.premikKoordinate[this.rotacijaTanka][0]*30, z: this.premikKoordinate[this.rotacijaTanka][2]*30 }, 300).start();
  6.                     this.tween.easing(TWEEN.Easing.Quadratic.In);
  7.                 } else {
  8.                     this.tween = new TWEEN.Tween(this._SCENE.getObjectByName("nasMetek").position).to({ x: this.premikKoordinate[40 +this.rotacijaTanka][0]*30, z: this.premikKoordinate[40 + this.rotacijaTanka][2]*30 }, 300).start();
  9.                     this.tween.easing(TWEEN.Easing.Quadratic.In);
  10.             }
  11.  
  12.             if(this.rotacijaTanka == 0 && this._SCENE.getObjectByName("enemyTankec").position.x > -2 && this._SCENE.getObjectByName("enemyTankec").position.x < 2){
  13.                 let alert = this.alertCtrl.create({
  14.                     title: "Nice shot!",
  15.                     subTitle: "You have hit the target. Money doubled.",
  16.                     buttons: ['OK']
  17.                 });
  18.                 alert.present();
  19.             }else if(this.rotacijaTanka == 1 && this._SCENE.getObjectByName("enemyTankec").position.x >= 2 && this._SCENE.getObjectByName("enemyTankec").position.x < 5){
  20.                 let alert = this.alertCtrl.create({
  21.                     title: "Nice shot!",
  22.                     subTitle: "You have hit the target. Money doubled.",
  23.                     buttons: ['OK']
  24.                 });
  25.                 alert.present();
  26.             }else if(this.rotacijaTanka == 2 && this._SCENE.getObjectByName("enemyTankec").position.x >= 5 && this._SCENE.getObjectByName("enemyTankec").position.x < 8){
  27.                 let alert = this.alertCtrl.create({
  28.                     title: "Nice shot!",
  29.                     subTitle: "You have hit the target. Money doubled.",
  30.                     buttons: ['OK']
  31.                 });
  32.                 alert.present();
  33.             }else if(this.rotacijaTanka == 3 && this._SCENE.getObjectByName("enemyTankec").position.x >= 8 && this._SCENE.getObjectByName("enemyTankec").position.x < 11){
  34.                 let alert = this.alertCtrl.create({
  35.                     title: "Nice shot!",
  36.                     subTitle: "You have hit the target. Money doubled.",
  37.                     buttons: ['OK']
  38.                 });
  39.                 alert.present();
  40.             }else if(this.rotacijaTanka == 4 && this._SCENE.getObjectByName("enemyTankec").position.x >= 11 && this._SCENE.getObjectByName("enemyTankec").position.x < 13){
  41.                 let alert = this.alertCtrl.create({
  42.                     title: "Nice shot!",
  43.                     subTitle: "You have hit the target. Money doubled.",
  44.                     buttons: ['OK']
  45.                 });
  46.                 alert.present();
  47.             }else if(this.rotacijaTanka == 5 && this._SCENE.getObjectByName("enemyTankec").position.x >= 13 && this._SCENE.getObjectByName("enemyTankec").position.x <= 15){
  48.                 let alert = this.alertCtrl.create({
  49.                     title: "Nice shot!",
  50.                     subTitle: "You have hit the target. Money doubled.",
  51.                     buttons: ['OK']
  52.                 });
  53.                 alert.present();
  54.             }else if(this.rotacijaTanka == -1 && this._SCENE.getObjectByName("enemyTankec").position.x <= -2 && this._SCENE.getObjectByName("enemyTankec").position.x > -5){
  55.                 let alert = this.alertCtrl.create({
  56.                     title: "Nice shot!",
  57.                     subTitle: "You have hit the target. Money doubled.",
  58.                     buttons: ['OK']
  59.                 });
  60.                 alert.present();
  61.             }else if(this.rotacijaTanka == -2 && this._SCENE.getObjectByName("enemyTankec").position.x <= -5 && this._SCENE.getObjectByName("enemyTankec").position.x > -8){
  62.                 let alert = this.alertCtrl.create({
  63.                     title: "Nice shot!",
  64.                     subTitle: "You have hit the target. Money doubled.",
  65.                     buttons: ['OK']
  66.                 });
  67.                 alert.present();
  68.             }else if(this.rotacijaTanka == -3 && this._SCENE.getObjectByName("enemyTankec").position.x <= -8 && this._SCENE.getObjectByName("enemyTankec").position.x > -11){
  69.                 let alert = this.alertCtrl.create({
  70.                     title: "Nice shot!",
  71.                     subTitle: "You have hit the target. Money doubled.",
  72.                     buttons: ['OK']
  73.                 });
  74.                 alert.present();
  75.             }else if(this.rotacijaTanka == -4 && this._SCENE.getObjectByName("enemyTankec").position.x <= -11 && this._SCENE.getObjectByName("enemyTankec").position.x > -13){
  76.                 let alert = this.alertCtrl.create({
  77.                     title: "Nice shot!",
  78.                     subTitle: "You have hit the target. Money doubled.",
  79.                     buttons: ['OK']
  80.                 });
  81.                 alert.present();
  82.             }else if(this.rotacijaTanka == -5 && this._SCENE.getObjectByName("enemyTankec").position.x >= -13 && this._SCENE.getObjectByName("enemyTankec").position.x <= -15){
  83.                 let alert = this.alertCtrl.create({
  84.                     title: "Nice shot!",
  85.                     subTitle: "You have hit the target. Money doubled.",
  86.                     buttons: ['OK']
  87.                 });
  88.                 alert.present();
  89.             }
  90.  
  91.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top