public bool CanDrop(Draggable draggable) { if (droppableDataTypes.Count == 0) { return(true); } foreach (var t in droppableDataTypes) { if (draggable.data.GetType() == Type.GetType(t)) { return(true); } } return(false); }
public void RemoveSpellComponentFromCraftZone(Draggable draggable) { if (draggable.data is SpellEffect) { draggable.AddDraggableToZone(effectZone); var effect = (SpellEffect)draggable.data; var index = ((List <SpellEffectContainer>)spell.spellEffects).FindIndex(x => x.spellEffect.effectName == effect.effectName); if (index != -1) { ((List <SpellEffectContainer>)spell.spellEffects).RemoveAt(index); } } else if (draggable.data is string) { draggable.AddDraggableToZone(targetZone); } Save(); }
internal void OnDragFailed(Draggable draggable) { onDragFailed.Invoke(draggable); }
internal void OnDrop(Draggable draggable) { onDrop.Invoke(draggable); }