Skip to content

Instantly share code, notes, and snippets.

@st4rdog
Last active December 26, 2015 00:57
Show Gist options
  • Save st4rdog/6dcfa011b0c86c1762a5 to your computer and use it in GitHub Desktop.
Save st4rdog/6dcfa011b0c86c1762a5 to your computer and use it in GitHub Desktop.
public class Weapon : IWeapon, IDamageDealer, IEquippable {
// IWeapon
public virtual void Attack()
{
// Default weapon attack goes here
// Virtual so it can be overridden by subclasses
}
// IDamageDealer
public virtual void DealDamage(IDamageable damageable, int amount)
{
}
// IEquippable
public virtual void Equip()
{
}
public virtual void Unequip()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment