public void TestRedirect() { Movement move = new Movement(); Collision col = new Collision(); Node nod = new Node(OrbIt.game.room); move.active = true; col.active = true; nod.active = true; Console.WriteLine(move.active + " " + col.active + " " + nod.active); redirector.AssignObjectToPropertySet("active", move); redirector.active = false; redirector.AssignObjectToPropertySet("active", col); redirector.active = false; redirector.AssignObjectToPropertySet("active", nod); redirector.active = false; Console.WriteLine(move.active + " " + col.active + " " + nod.active); }
public void NotEvenOnce() { Action<string> d = OldStopTimer; Action<string> dd = (Action<string>)Delegate.CreateDelegate(typeof(Action<string>), d.Method); Type t = typeof(Node); MethodInfo mi = t.GetMethod("RemoveTag"); Collision col = new Collision(); //dynamic meth = Delegate.CreateDelegate(mi.) }