Last active
November 14, 2016 05:58
-
-
Save jweimann/a39462c70c10a24e132f74f4e16eea02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[CreateAssetMenu(menuName = "Weapons/WeaponSettings")] | |
public class WeaponSettings : ScriptableObject | |
{ | |
[SerializeField] | |
[Tooltip("Time required between trigger clicks to fire.")] | |
[Range(0, 2f)] | |
private float _fireDelay = 0.25f; | |
[SerializeField] | |
[Tooltip("Max range this weapon can shoot.")] | |
[Range(1, 200f)] | |
private float _maxRange = 50f; | |
[SerializeField] | |
[Tooltip("Damage dealt by this weapon (not including any modifiers).")] | |
[Range(1, 10)] | |
private int _damage = 1; | |
[SerializeField] | |
[Tooltip("Amount of ammo the weapon starts with.")] | |
[Range(1, 1000)] | |
private int _startingAmmo = 24; | |
[SerializeField] | |
[Tooltip("Number of shots the weapon can use per reload.")] | |
[Range(1, 1000)] | |
private int _ammoPerClip = 6; | |
public int Damage { get { return _damage; } } | |
public float FireDelay { get { return _fireDelay; } } | |
public float MaxRange { get { return _maxRange; } } | |
public int StartingAmmo { get { return _startingAmmo; } } | |
public int AmmoPerClip { get { return _ammoPerClip; } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment