add: pistol weapon and enemy

This commit is contained in:
KOSMOGOR
2025-03-08 22:41:34 +03:00
parent 7d6cef4989
commit 17f3448f6c
14 changed files with 542 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
using UnityEngine;
public abstract class Weapon : MonoBehaviour
{
public bool isActive { get; private set; } = true;
public abstract void Shoot(bool keyDown, bool keyHold);
public void SetWeaponState(bool active) {
isActive = active;
GetComponent<MeshRenderer>().enabled = active;
}
}