public void TryRepair(PlayerInputContainer pcon)
 {
     if (pcon.GetRTButton() == 1 && GameController.instance.boostBroken)
     {
         timer += regenAmt;
         GameController.instance.SetBoost(timer);
         GameController.instance.UpdateBoost();
         if (timer >= coolDownTime)
         {
             timer = 0;
             GameController.instance.boostBroken = false;
         }
     }
 }
    public void MoveShip(PlayerInputContainer pic)
    {
        if (pic.isOperatingStation && !isDeflecting)
        {
            if (pic.GetRTButton() == 1 && !GameController.instance.boostBroken)
            {
                GameController.instance.isBoosting = true;
                GameController.instance.SendMessage("UseBoost", usageAmt);
                timeStamp = Time.time + coolDownPeriod;
                if (boostTimeStamp == 0 && GameController.instance.GetCurrentBoost() == 0)
                {
                    boostTimeStamp = Time.time + GameController.instance.getTimeToBreak();
                }
                inputAcceleration = baseAccel + accelIncrease;
                velocityDrag      = baseDrag - dragDecrease;
                maxSpeed          = baseSpeed + maxSpeedIncrease;
                //Debug.Log("pressing RT, max speed: " + maxSpeed);
            }
            else
            {
                GameController.instance.isBoosting = false;
                //velocityDrag = baseDrag;
                inputAcceleration = baseAccel;
                maxSpeed          = baseSpeed;
            }
            if (Time.time > boostTimeStamp && GameController.instance.isBoosting && GameController.instance.GetCurrentBoost() == 0)
            {
                GameController.instance.boostBroken = true;
            }

            if (Time.time >= timeStamp && !GameController.instance.boostBroken)
            {
                GameController.instance.SendMessage("RegenerateBoost", regenAmt);
            }
            // apply forward input
            acceleration = new Vector3(pic.GetHorizontal() * inputAcceleration, pic.GetVertical() * inputAcceleration, 0f);
            velocity    += acceleration * Time.deltaTime;
        }
        velocityDrag      = baseDrag;
        inputAcceleration = baseAccel;
    }
    public void Fire(PlayerInputContainer pcon)
    {
        if (timer < shootFrequency)
        {
            return;
        }

        if ((fireButton == "A" && pcon.GetAButton()) ||
            (fireButton == "X" && pcon.GetXButton()) ||
            (fireButton == "Y" && pcon.GetYButton()) ||
            (fireButton == "RT" && pcon.GetRTButton() == 1))
        {
            for (int i = 0; i < projectilesFiredPerPress; i++)
            {
                Instantiate(projectile, transform.position, transform.rotation);
            }
            if (gunAnim != null)
            {
                gunAnim.SetTrigger("Fire");
            }
            timer = 0;
        }
    }