public int ReactTo(IAttacker attacker, int rawDamage, bool isCritical) { int damage = rawDamage; damage = Slot.Calculate(_target, attacker, damage, isCritical); damage = SubSlot.Calculate(_target, attacker, damage, isCritical); _target.Hp.Subtract(damage); return(damage); }
public void Unfold(MyObjectToPlace current) { parentMainSlot.HideVisuals(false); isUnFold = true; foreach (MyObjectToPlace o in objectList) { SubSlot newInstance = Instantiate(subSlotPrefab, this.transform); newInstance.SetObjectAndParent(o, this); subSlots.Add(newInstance); } subSlots.Where(x => x.currentObject.Equals(current)).FirstOrDefault().transform.SetAsLastSibling(); }