using System.Collections; using System.Collections.Generic; using UnityEngine; // TODO: Make Inherit from WeaponSlot // Create a float field called 'attackRange' for the attack range and initialise to 2f - make visible in Inspector window // Create a read only property that returns the value of the field // Class is serializable so it is visible in Inspector window [System.Serializable] public class Weapon { // attackRange - indicates the attack range of the weapon // damageAmount - indicates the damage the weapon inflicts [SerializeField] private List models = new List(); [SerializeField] private float attackRange = 2f; [SerializeField] private float damageAmount = 0.5f; private string weaponCode; /// /// Gets the attack range for this weapon /// public float AttackRange { get { return attackRange; } } /// /// Gets the damage amount for this weapon /// public float DamageAmount { get { return damageAmount; } } public List Models { get { return models; } } }