Exemplo n.º 1
0
        private static bool NewPropertyCallbackTest(string name, TCODValueType type, TCODValue value)
        {
            switch (type)
            {
            case TCODValueType.TCOD_TYPE_BOOL:
                deal_damage_defined = true;
                break;

            case TCODValueType.TCOD_TYPE_COLOR:
                if (name.ToString() == "color")
                {
                    color_defined = true;
                }
                else
                {
                    damaged_color_defined = true;
                }
                break;

            case TCODValueType.TCOD_TYPE_DICE:
                damages_defined = true;
                break;

            case TCODValueType.TCOD_TYPE_FLOAT:
                weight_defined = true;
                break;

            case TCODValueType.TCOD_TYPE_INT:
                cost_defined = true;
                break;

            case TCODValueType.TCOD_TYPE_STRING:
                damage_type_defined = true;
                break;

            case TCODValueType.TCOD_TYPE_VALUELIST00:
                list_defined = true;
                break;

            default:
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
 private extern static void TCOD_struct_add_list_property(IntPtr def, StringBuilder name, TCODValueType type, bool mandatory);
Exemplo n.º 3
0
 /// <summary>
 /// Add new property to structure
 /// </summary>
 /// <param name="name">Name of Property</param>
 /// <param name="type">Property Type</param>
 /// <param name="mandatory">Is Mandatory?</param>
 public void AddProperty(string name, TCODValueType type, bool mandatory)
 {
     TCOD_struct_add_property(m_parserStructure, new StringBuilder(name), type, mandatory);
 }
Exemplo n.º 4
0
 private extern static IntPtr TCOD_parser_get_list_property(IntPtr parser, StringBuilder name, TCODValueType type);
Exemplo n.º 5
0
 private bool NativePropertyCallback(StringBuilder name, TCODValueType type, TCODValue v)
 {
     return(np(GetStringIfValid(name), type, v));
 }
Exemplo n.º 6
0
 private static bool NewPropertyCallbackTest(string name, TCODValueType type, TCODValue value)
 {
     switch (type)
     {
         case TCODValueType.TCOD_TYPE_BOOL:
             deal_damage_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_COLOR:
             if (name.ToString() == "color")
                 color_defined = true;
             else
                 damaged_color_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_DICE:
             damages_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_FLOAT:
             weight_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_INT:
             cost_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_STRING:
             damage_type_defined = true;
             break;
         case TCODValueType.TCOD_TYPE_VALUELIST00:
             list_defined = true;
             break;
         default:
             return false;
     }
     return true;
 }
Exemplo n.º 7
0
 private extern static void TCOD_struct_add_list_property(IntPtr def, StringBuilder name, TCODValueType type, bool mandatory);
Exemplo n.º 8
0
 /// <summary>
 /// Add new property to structure
 /// </summary>
 /// <param name="name">Name of Property</param>
 /// <param name="type">Property Type</param>
 /// <param name="mandatory">Is Mandatory?</param>
 public void AddProperty(string name, TCODValueType type, bool mandatory)
 {
     TCOD_struct_add_property(m_parserStructure, new StringBuilder(name), type, mandatory);
 }
Exemplo n.º 9
0
 private extern static IntPtr TCOD_parser_get_list_property(IntPtr parser, StringBuilder name, TCODValueType type);
Exemplo n.º 10
0
 private bool NativePropertyCallback(StringBuilder name, TCODValueType type, TCODValue v)
 {
     return np(GetStringIfValid(name), type, v);
 }