Skip to content

Instantly share code, notes, and snippets.

View CartBlanche's full-sized avatar

Dominique Louis CartBlanche

View GitHub Profile
@CartBlanche
CartBlanche / Main.cs
Created March 10, 2012 23:16
Using Block example
using System;
namespace UsingUsingBlocks
{
class SomethingThatDisposes : IDisposable
{
public SomethingThatDisposes()
{
Console.WriteLine("Creating");
}
protected function playerInfoService_resultHandler(event:ResultEvent):void
{
var xmlList : XMLList = XML(event.result).metadata.section;
var xmlListCollection : XMLListCollection = new XMLListCollection(xmlList);
var playerInfo : PlayerInfo;
Alert.show( "How Long" + xmlListCollection.length, "Collection Length?" );
for each (var node : XML in xmlListCollection)
@CartBlanche
CartBlanche / gist:1317702
Created October 26, 2011 20:23
Android.Media.MediaPlayer();
internal void Prepare()
{
Player = new Android.Media.MediaPlayer();
var fd = Game.contextInstance.Assets.OpenFd(_fileName).FileDescriptor;
Player.SetDataSource(fd);
Player.Prepare();
}
@CartBlanche
CartBlanche / gist:1299799
Created October 19, 2011 21:52
Intents in MonoDroid.Dialogs.
Intent intent = new Intent(Context, Fixtures); // Get Error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected (CS0119)
intent.PutExtra("ShowAll", showAll.Value);
intent.AddFlags(ActivityFlags.NewTask);
StartActivity(intent);
@CartBlanche
CartBlanche / gist:1296947
Created October 18, 2011 22:34
MonoGame AwardAchievement wrapper
private void AwardAchievement( string aAchievementName, double aPercentageComplete )
{
if( ( Gamer.SignedInGamers.Count > 0 ) && ( Gamer.SignedInGamers[0].IsSignedInToLive ) )
{
Gamer.SignedInGamers[0].AwardAchievement(aAchievementName, aPercentageComplete);
}
}
@CartBlanche
CartBlanche / gist:1288153
Created October 14, 2011 20:02
MT 4, trying compile iOS5 when doing distribution build....
Building: OldColfeians.iOS (Distribution|iPhone)
Performing main compilation...
/Developer/MonoTouch/usr/bin/smcs /noconfig "/out:/Users/savagesoftware/Projects/OldColfeiansFixtures/bin/iPhone/Distribution/OldColfeians.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.Linq.dll" "/r:/Users/savagesoftware/Development/CartBlanche/MonoTouch.Dialog/MonoTouch.Dialog/bin/iPhone/Debug/MonoTouch.Dialog.dll" /nologo /warn:4 /optimize- /codepage:utf8 "/define:IOS" /t:exe "/Users/savagesoftware/Projects/OldColfeiansFixtures/MainWindow.xib.designer.cs" "/Users/savagesoftware/Projects/OldColfeiansFixtures/Main.cs" "/Users/savagesoftware/Projects/OldColfeiansFixtures/Classes/WeaponType.cs" "/Users/savagesoftware/Projects/OldColfeiansFixtures/Classes/MurderMapAnnotation.cs" "/Users/savagesof
@CartBlanche
CartBlanche / gist:1287948
Created October 14, 2011 18:45
iPad 2 iOS 5 Crash
Incident Identifier: 749920E0-C258-41BF-A725-287A78E0F54B
CrashReporter Key: ef8ecfb0d74390cc718545235c86c54958e2a5b5
Hardware Model: iPad2,2
Process: OldColfeians [10595]
Path: /var/mobile/Applications/A6364D83-A671-45A9-894E-06CB562D3B21/OldColfeiansiOS.app/OldColfeians
Identifier: OldColfeians
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@CartBlanche
CartBlanche / gist:1287945
Created October 14, 2011 18:44
iPhone iOS 5 Crash
Incident Identifier: FF1C0C77-B847-4293-9544-09BA9BB17767
CrashReporter Key: 3168c5b64d6c379397c2cc80677c3238b2b4761c
Hardware Model: iPhone3,1
Process: OldColfeians [13122]
Path: /var/mobile/Applications/654C37CB-451C-41EC-9268-D221CF8DCEE1/OldColfeiansiOS.app/OldColfeians
Identifier: OldColfeians
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@CartBlanche
CartBlanche / gist:1271517
Created October 7, 2011 22:44
Render To Texture iOS
/******************************************************************************
@File OGLESRenderToTexture.cpp
@Title RenderToTexture
@Version
@Copyright Copyright (C) Imagination Technologies Limited.
@CartBlanche
CartBlanche / gist:1212646
Created September 12, 2011 22:24
Default OpenGL Template failing.
Creating package
Build started 12/09/2011 23:14:58.
__________________________________________________
Project "/Users/sandy/Projects/NeHe/5/5-Android.csproj" (SignAndroidPackage target(s)):
Target _GenerateAndroidAssetsDir:
No output files were specified for target _GenerateAndroidAssetsDir, skipping.