public void Update(Playstates.PlayState State, Worldspawn Worldspawn, GameObject Owner, int GOID) { var text = Owner.QueryComponent<TextHolder>(); var builder = new StringBuilder(); foreach (var property in Properties) { var split = property.Item1.Split(' '); var useful = split.First(); var propName = useful.Split('.').Last(); var className = useful.Substring(0, useful.Length - propName.Length - 1); var classType = Extensions.GetTypeInfo(Type.GetType(className)); var propType = classType.GetDeclaredProperty(propName); var fieldType = classType.GetDeclaredField(propName); builder.Append(propName); if (split.Length > 1) { builder.Append(" ("); builder.Append(property.Item1.Substring(useful.Length + 1)); builder.Append(")"); } builder.Append(" : "); builder.Append(propType != null ? propType.GetValue(property.Item2) : fieldType.GetValue(property.Item2)); builder.AppendLine(); } text.Text.Text = builder.ToString(); }
public void Draw(Playstates.PlayState State, Worldspawn Worldspawn, GameObject Owner, int GOID) { }