Пример #1
0
        public Longsword() : base("Longsword")
        {
            WeaponAttribute longswordAttribute = new WeaponAttribute(this);

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

            ReceiveMessage(longswordMessage);
        }
Пример #2
0
        public void ReceiveMessage <T>(T message)
        {
            WeaponMessage weaponMessage = message as WeaponMessage;

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