Skip to content

Instantly share code, notes, and snippets.

@devboy
Created October 8, 2013 17:59

Revisions

  1. devboy created this gist Oct 8, 2013.
    25 changes: 25 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    type GameObject
    {
    int a;
    int b;
    int c;
    }

    type GameObjectWithCheats > GameObject
    {
    int d;
    }

    if(cheats)
    {
    injector.map(GameObjectWithCheats, GameObject);
    }
    else
    {
    injector.map(GameObject, GameObject);
    }

    //Inside game

    GameObject object = injector.getObject(GameObject);
    object.a = 5;