Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (!showUp && enemySystem.GetDeathNumber() >= 3)
     {
         ShowUp();
     }
     //if (Input.GetKeyDown(KeyCode.Z)) ShowUp();
     //if (heatPower > 0) {
     //    if (heatTime < 30.0f) heatTime += Time.deltaTime;
     //    else {
     //        heatPower--;
     //        heatTime = 0.0f;
     //        if (heatPower < 3) animator.SetTrigger("notHeat");
     //    }
     //}
 }
 void Update()
 {
     if (!showUp)
     {
         if (enemySystem.GetDeathNumber() >= 4)
         {
             showUp = true;
             CanonAnimator.SetBool("CanonDisable", false);
         }
     }
     else
     {
         //LeftListener();
         //OutOfBullet();
         if (CanonScript.CanonisfillingPowder)
         {
             CanonAnimtion();
             if (ShowRightAim)
             {
                 if (useControler)
                 {
                     if (Input.GetButtonDown(whichPlayer + "ButtonA"))
                     {
                         ShootAndExplosion();
                     }
                     if (Input.GetButtonDown(whichPlayer + "ButtonB"))
                     {
                         CancelShoot();
                     }
                 }
                 else
                 {
                     if (Input.GetKeyDown(KeyCode.Space))
                     {
                         ShootAndExplosion();
                     }
                     if (Input.GetKeyDown(KeyCode.Z))
                     {
                         CancelShoot();
                     }
                 }
                 RaycastHitWall();
                 AimControl(RightAim);
             }
             else
             {
                 if (CanonScript.CanonTriigerIN)
                 {
                     if (useControler)
                     {
                         if (Input.GetButtonDown(whichPlayer + "ButtonA"))
                         {
                             ReadyToShoot(true);
                             CanonScript.CraftCantFunc(true);
                         }
                     }
                     else
                     {
                         if (Input.GetKeyDown(KeyCode.Space))
                         {
                             ReadyToShoot(true);
                             CanonScript.CraftCantFunc(true);
                         }
                     }
                 }
             }
         }
     }
 }