So simple. In your C# code, simply add this line.
Debugger.Launch();
You can do this in any language, but I'm using c# at the moment so showing that. This is very handy.
Notes on all my "fun" programming projects.
Debugger.Launch();
bool bUndoDown = false;
// checking for ctrl key
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Z:
if (bUndoDown)
break;
if (e.Modifiers == (Keys.Control | Keys.Shift))
{
bUndoDown = true;
Console.WriteLine("redo pressed");
}
else if (Control.ModifierKeys == Keys.Control)
{
bUndoDown = true;
undodebugcnt++;
Console.WriteLine("undo pressed "+undodebugcnt);
}
break;
}
}
private void Form1_KeyUp(object sender, KeyEventArgs e)
{
if (bUndoDown)
{
if (e.KeyCode==Keys.Z)
{
bUndoDown = false;
}
}
}
public bool myact_set_folder(string sPath) // set the folder to search for files
{
dcSmart.SmartNav localSmartObj = null;
try
{
localSmartObj = new dcSmart.SmartNav(this);
//If the parameter is a smart parameter, look up the actual path (returns the original path if it was not a smart parameter)
mFolderPath = localSmartObj.MetaWord(sPath);
RRLog.Write("Image source folder set to: " + mFolderPath);
}
catch (Exception ex)
{
RRLog.Write("myact_set_folder error: " + ex.ToString());
return false;
}
finally
{
localSmartObj = null;
}
return true;
}
'Get the smart parameter for the FinderString
sTmp = MetaWord(FinderString)
If (sTmp = "") Then 'Field Value
Set oChild = CurrentObj.FindChild(Right((FinderString), Len((FinderString))-1))
If Not(oChild Is Nothing) Then
WriteLog("Hostname from field")
sTmp = oChild.Text
Set oChild = Nothing
End If
End If
ValueToSearch = sTmp
WriteLog("ValueToSearch = " & ValueToSearch)
private int iCurCell; public int CurCell { get { return iCurCell; } set { this.iCurCell = value; } }
public Sprite tile_plain; // assign this in unity by dragging a sprite to it
void Start()
{
GameObject tile = new GameObject();
tile.AddComponent();
tile.GetComponent().sprite = tile_plain;
tile.transform.position = new Vector2((i * tile_plain.rect.width)/tile_plain.pixelsPerUnit, 5f);
}
//this is how you get a reference and value out of another script
scriptholder = GameObject.Find("EmptyScriptHolder");
GridManager script = scriptholder.GetComponent<GridManager>();
print("Grid gap =" + script.stepsize);
I also messed with the publish system in XNA Game Studio 3.0 and created an installer you can use to run the game. It is available here: http://www.woodsgoods.com/gawxna/01skeetslider.
I have also been considering offering the source code to some of these games to try and cover some of my time. It's a minimal $5 to purchase the C# source code to the Skeet Slider XNA Game. Please tell me if you think this is reasonable or not? I could really use some feedback.