private static string GetProperty(string text, IGameEntity entity) { var returnVal = string.Empty; if (entity == null) { return(returnVal); } var ctx = entity.GetContext("PropertyContext"); if (ctx == null) { return(returnVal); } var obj = ctx.CastAs <PropertyContext>().GetProperty <object>(text); if (obj != null) { returnVal = obj.ToString(); } return(returnVal); }
public static IContentsContext GetContentsContext(this IGameEntity entity) { return(entity.GetContext("IContentsContext").CastAs <IContentsContext>()); }
public static IPropertyContext GetPropertyContext(this IGameEntity entity) { return(entity.GetContext("IPropertyContext").CastAs <IPropertyContext>()); }