Weapon Class Reference

A Serializable class that is NOT a ScriptableObject. Instances of this class will not be assets, they will be stored inside a SOLDIER asset. As such, we do NOT need an editor for this object type, only a custom property drawer.

Detailed Description

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using EyE.Unity;
{
[System.Serializable]
public class Weapon
{
[ExposeMember]
public WeaponType typeOfWeapon;
[ExposeMember]
public int currentAmmo;
[ExposeMember]
public string engraving;
[ExposeMember]
//[ExposeRangeAttrib(0,10)]
public int Quality = 1;
[ExposeMember]
public float Damage
{
get {
if (typeOfWeapon == null) return 0;
return typeOfWeapon.Damage * 2 * Quality;
}
}
}
}

Public Attributes

int currentAmmo
 
string engraving
 
int Quality
 
WeaponType typeOfWeapon
 

Properties

float Damage [get]
 
+ Collaboration diagram for Weapon:
EyE
This namespace contains classes that provide various tools for use in the Unity Editor.
Definition: EmbededXMLTooltip.cs:5
EyE.Unity.Examples
Definition: CatDebugExample.cs:7
EyE.Unity
This namespace holds classes that extended or inherit from various Unity defined classes....
Definition: EmbededXMLTooltip.cs:5