예제 #1
0
        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);
        }
예제 #2
0
 public static IContentsContext GetContentsContext(this IGameEntity entity)
 {
     return(entity.GetContext("IContentsContext").CastAs <IContentsContext>());
 }
예제 #3
0
 public static IPropertyContext GetPropertyContext(this IGameEntity entity)
 {
     return(entity.GetContext("IPropertyContext").CastAs <IPropertyContext>());
 }