public static DragAndDropAction getSelectedFileAction(String sSelectedFile) { var dActionData = new Dictionary<String, object>(); dActionData.Add("Path", sSelectedFile); var dddaSourceCode = new DragAndDropAction(Action.SelectedFileAction, dActionData); return dddaSourceCode; }
public static DragAndDropAction getObjectDataAction(Object oObjectToSend) { var dActionData = new Dictionary<String, object>(); dActionData.Add("Object", oObjectToSend); var dddaSourceCode = new DragAndDropAction(Action.ObjectData, dActionData); return dddaSourceCode; }
private void Awake() { _dragRedToYellow = new DragAndDropAction( takableInfo: new FullNamesInfo(new List <string> { "Red", "Purple", }, new List <string> { "Yellow", "Purple", }), dragCollidableInfo: new CollidersInfo(_grayColliders, _blackColliders), droppableInfo: new NamePartInfo("Yellow", "UncorrectDroppableColor"), OnTaken: collider => { Log.Msg("You took correct collider"); }, OnTakeFailed: collider => { Log.Msg("Uncorrect collider to take"); }, OnDragCollided: collider => { Log.Msg("While drag you collided with correct collider"); }, OnDragCollideFailed: collider => { Log.Msg("While drag you collided with uncorrect collider"); }, OnDropped: collider => { Log.Msg("Dropped to correct collider"); }, OnDropFailed: collider => { Log.Msg("Dropped to uncorrect collider"); }); AInputMain.SetAction(_dragRedToYellow); }
public static DragAndDropAction getSourceCodeAction(String sPathToSourceCodeFile) { var dActionData = new Dictionary<String, object>(); dActionData.Add("Path", sPathToSourceCodeFile); dActionData.Add("Contents", Files.getFileContents(sPathToSourceCodeFile)); var dddaSourceCode = new DragAndDropAction(Action.SourceCodeAction, dActionData); return dddaSourceCode; }
public static DragAndDropAction getObjectDataAction(Object oObjectToSend) { var dActionData = new Dictionary <String, object>(); dActionData.Add("Object", oObjectToSend); var dddaSourceCode = new DragAndDropAction(Action.ObjectData, dActionData); return(dddaSourceCode); }
public static DragAndDropAction getSelectedFileAction(String sSelectedFile) { var dActionData = new Dictionary <String, object>(); dActionData.Add("Path", sSelectedFile); var dddaSourceCode = new DragAndDropAction(Action.SelectedFileAction, dActionData); return(dddaSourceCode); }
public static DragAndDropAction getSourceCodeAction(String sPathToSourceCodeFile) { var dActionData = new Dictionary <String, object>(); dActionData.Add("Path", sPathToSourceCodeFile); dActionData.Add("Contents", Files.getFileContents(sPathToSourceCodeFile)); var dddaSourceCode = new DragAndDropAction(Action.SourceCodeAction, dActionData); return(dddaSourceCode); }
public void Cancel() { Answer = DragAndDropAction.Cancel; TryClose(); }
public void After() { Answer = DragAndDropAction.After; TryClose(); }
public void Inside() { Answer = DragAndDropAction.Inside; TryClose(); }
public void Before() { Answer = DragAndDropAction.Before; TryClose(); }
public void Init(string account1, string account2) { Account1 = account1; Account2 = account2; Answer = DragAndDropAction.Cancel; }