// Release mouse on destination cell (this function is triggered for the origin cell only) void OnMouseUp() { // If the game is not paused if (!levelControl.checkPause()) { // If the level is over, do nothing if (levelControl.levelEnd) { return; } // If this is a valid move - destCell is not empty, checkMove returns true, origin and dest cells are different, // origin and dest cells are within the origin cell's drone range if (inputControl.destCell != null && inputControl.checkMove() == true && inputControl.originCell != inputControl.destCell && isInRangeOfOriginCell(true)) { // perform move through InputControl.cs inputControl.performMove(); } // Terminate the move in InputControl.cs inputControl.endMove(); } }