update: player prefab and Composing scene

update: Pistol shoots bullets with spawnPosition rotation
This commit is contained in:
KOSMOGOR
2025-03-10 10:23:51 +03:00
parent a449b7bb9e
commit 8ea5bc896e
4 changed files with 157 additions and 373 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ public class Pistol : Weapon
public override void Shoot(bool keyDown, bool keyHold) {
if (keyDown && (fireRate == 0 || currentDelay == 1 / fireRate)) {
Instantiate(projectilePrefab, spawnPosition.position, transform.rotation);
Instantiate(projectilePrefab, spawnPosition.position, spawnPosition.rotation);
currentDelay = 0;
}
}