Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        aim.value        = 0;
        velocityHigh     = false;
        shootBoolBlue    = false;
        shootBoolRed     = false;
        colisionOffLevel = GameObject.Find("Ball").GetComponent <ColisionOffLevel>();
        ball             = GameObject.Find("Ball").GetComponent <Transform>();

        point = GameObject.Find("Game_manager").GetComponent <PointSystem>();
    }
    // Time is set to 3/4 of a second to get from zero to full power

    /*  public float maxChargeTime = 0.75f;
     *
     *
     *
     *
     * // Input buttons are string values
     * private string shoot;
     *
     * //How much force do we have?
     * private float currentForce;
     *
     * //calculate how fast we charge
     * private float chargeSpeed;
     *
     * //Fired yes or no?
     * private bool shot;
     *
     *
     * private void OnEnable()
     * {
     *    currentForce = minShootForce;
     *    aim.value = minShootForce;
     * }
     *
     */
    // Start is called before the first frame update
    void Start()
    {
        aim.value        = 0;
        velocityHigh     = false;
        shootBool        = false;
        colisionOffLevel = GameObject.Find("Ball").GetComponent <ColisionOffLevel>();

        //       shoot = "Fire"; //Check project settings and input to see the fire1 button

        //Calculate chargespeed
        //       chargeSpeed = (maxShootForce - minShootForce) / maxChargeTime;
    }