Exemplo n.º 1
0
 public static void OnRoarServerUpdate(Roar.Events.UpdateEvent info)
 {
     if (roarServerUpdateEvent != null)
     {
         roarServerUpdateEvent(info);
     }
 }
Exemplo n.º 2
0
    public void testPropertyUpdated()
    {
        mockFetch(userView, null);

        StringAssert.IsMatch("5", properties.GetValue("stamina") as String);

        System.Xml.XmlElement   updateNode = RoarExtensions.CreateXmlElement("<update type='attribute' ikey='stamina' value='2'/>");
        Roar.Events.UpdateEvent e          = Roar.Events.UpdateEvent.CreateFromXml(updateNode);
        StringAssert.IsMatch("stamina", e.ikey);
        StringAssert.IsMatch("attribute", e.type);
        StringAssert.IsMatch("2", e.val);

        RoarManager.OnRoarServerUpdate(e);

        StringAssert.IsMatch("2", properties.GetValue("stamina") as String);
    }