Reload animation speed ist nun abhängig von der Reload time und weiter bugs fixed vom Reloaden davor + Sky box added (schöner)
This commit is contained in:
@@ -28,7 +28,6 @@ public class WeaponScript : MonoBehaviour
|
||||
public void checkReload(){
|
||||
if(ammo == 0 || Input.GetKeyDown(inputManagerScript.getReload())){
|
||||
isReloading = true;
|
||||
animator.Play("Reloadanim");
|
||||
}
|
||||
if(isReloading){
|
||||
time += Time.deltaTime;
|
||||
@@ -40,6 +39,8 @@ public class WeaponScript : MonoBehaviour
|
||||
//animator.SetBool("isReloading",false);
|
||||
}
|
||||
}
|
||||
animator.SetFloat("speed",1 / reloadTime);
|
||||
animator.SetBool("isReloading",isReloading);
|
||||
}
|
||||
public void shoot(){
|
||||
if(!isReloading && delayOver){
|
||||
@@ -69,6 +70,7 @@ public class WeaponScript : MonoBehaviour
|
||||
spawnpoint = GameObject.Find("Player/PlayerView/BulletSpawnpoint");
|
||||
uI_Manager = GameObject.FindGameObjectWithTag("Manager").GetComponent<UI_Manager>();
|
||||
inputManagerScript = GameObject.Find("InputManager").GetComponent<InputManagerScript>();
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
Reference in New Issue
Block a user