Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Weapon extends Item
- {
- public ItemType ThisItemType;
- public enum ItemType
- {
- Weapon,
- Potion
- }
- public Weapon(ItemType type,int weaponDamage)
- {
- super();
- ThisItemType = type;
- setWeaponDamage(weaponDamage);
- }
- public void UseItem()
- {
- if(ThisItemType == ItemType.Weapon)
- {
- //do shit
- }
- if(ThisItemType == ItemType.Potion)
- {
- //do shit
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement