Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        //Da eliminare più avanti
        anim = GameObject.FindGameObjectWithTag("Weapon").GetComponent <Animator>();
        CurrentRagedWeapon.UpdateFireRateoValue();
        CurrentRagedWeapon.UpdateTotalDamageValue();
        UpdateAmmoUI();

        //Execute shooting
        if (Input.GetMouseButtonDown(0) && CurrentRagedWeapon.ShootingType.IsAutomatic == false)
        {
            CurrentRagedWeapon.ShootingType.ShootingAction(CurrentRagedWeapon);
            //Da eliminare più avanti
            anim.Play("ShootAR");
        }
        if (Input.GetMouseButton(0) && CurrentRagedWeapon.ShootingType.IsAutomatic == true)
        {
            CurrentRagedWeapon.ShootingType.ShootingAction(CurrentRagedWeapon);
        }
    }