forked from Tr1ll10ns/Godot_FPS_Tutorial_CSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWeapon.cs
27 lines (24 loc) · 996 Bytes
/
Weapon.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Godot;
using System;
public abstract class Weapon : Spatial
{
[Export] public AudioStreamSample FireSound = ResourceLoader.Load("res://assets/Audio/RifleFire.wav") as AudioStreamSample;
[Export] public AudioStreamSample ReloadSound = ResourceLoader.Load("res://assets/Audio/PistolReload.wav") as AudioStreamSample;
public float Damage;
public AnimationLoader.AnimationState IdleAnimationState;
public AnimationLoader.AnimationState FireAnimationState;
public AnimationLoader.AnimationState ReloadAnimationState;
public bool WeaponEnabled;
public Player PlayerNode = null;
public int SpareAmmo;
public int AmmoInWeapon;
public bool Reloadable = false; // CAN_RELOAD
public bool Refillable = false; // CAN_REFILL
//
// Summary:
// Tells the weapon to open fire.
public abstract void FireWeapon();
public abstract bool ReloadWeapon();
public abstract bool EquipWeapon();
public abstract bool UnequipWeapon();
}