Ejemplo n.º 1
0
        public Longsword() : base("Longsword")
        {
            WeaponAttribute longswordAttribute = new WeaponAttribute(this);

            Components.Add(longswordAttribute);
            WeaponMessage longswordMessage = new WeaponMessage(7, 10);

            ReceiveMessage(longswordMessage);
        }
Ejemplo n.º 2
0
        public void ReceiveMessage <T>(T message)
        {
            WeaponMessage weaponMessage = message as WeaponMessage;

            if (weaponMessage != null)
            {
                MinDamage = weaponMessage.MinDamage;
                MaxDamage = weaponMessage.MaxDamage;
            }
        }