Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (gun1 == null)
        {
            Debug.Log("Gun 1 is null");
            gun1     = GameObject.FindGameObjectWithTag("player_gun");
            shooting = gun1.GetComponent <gun1_shooting>();
            Debug.Log("gun1 is now assigned");
        }
        CurrentAtkSpd = shooting.attackrate;
        TimeScale     = Time.timeScale;
        if (Input.GetKeyDown("e"))
        {
            SlowMo();
        }


        OverHeat();
        MPDegen();
        MPLimiters();

        if (SlowMoTrue == true && attributes.current_mp <= 0)
        {
            SlowMo();
        }
    }
    void Start()
    {
        GameObject Gun1_object = GameObject.FindGameObjectWithTag("player_gun");

        Gun1 = Gun1_object.GetComponent <gun1_shooting>();
    }