Esempio n. 1
0
    //----------------------------------------------------------------------------

    private static Texture2D LoadTextureByAttributeType(PKFxManagerImpl.EBaseType AttributeType)
    {
        string iconPath;

        switch (AttributeType)
        {
        case PKFxManagerImpl.EBaseType.Int:
            iconPath = "AttributeI1";
            break;

        case PKFxManagerImpl.EBaseType.Int2:
            iconPath = "AttributeI2";
            break;

        case PKFxManagerImpl.EBaseType.Int3:
            iconPath = "AttributeI3";
            break;

        case PKFxManagerImpl.EBaseType.Int4:
            iconPath = "AttributeI4";
            break;

        case PKFxManagerImpl.EBaseType.Float:
            iconPath = "AttributeF1";
            break;

        case PKFxManagerImpl.EBaseType.Float2:
            iconPath = "AttributeF2";
            break;

        case PKFxManagerImpl.EBaseType.Float3:
            iconPath = "AttributeF3";
            break;

        case PKFxManagerImpl.EBaseType.Float4:
            iconPath = "AttributeF4";
            break;

        default:
            return(null);
        }

        return(Resources.Load <Texture2D>(PKFxEditorTools.IconsRootDirectory + "/" + iconPath));
    }
Esempio n. 2
0
 public AttributeDesc(PKFxManagerImpl.SNativeAttributeDesc desc)
 {
     m_Type       = (PKFxManagerImpl.EBaseType)desc.m_AttributeType;
     m_MinMaxFlag = (int)desc.m_MinMaxFlag;
     m_Name       = Marshal.PtrToStringAnsi(desc.m_AttributeName);
     //			if ((byte)desc.MinMaxFlag & EAttrDescFlag.HasDesc)
     m_Description   = Marshal.PtrToStringAnsi(desc.m_Description);
     m_DefaultValue0 = desc.m_DefaultValueX;
     m_DefaultValue1 = desc.m_DefaultValueY;
     m_DefaultValue2 = desc.m_DefaultValueZ;
     m_DefaultValue3 = desc.m_DefaultValueW;
     m_MinValue0     = desc.m_MinValueX;
     m_MinValue1     = desc.m_MinValueY;
     m_MinValue2     = desc.m_MinValueZ;
     m_MinValue3     = desc.m_MinValueW;
     m_MaxValue0     = desc.m_MaxValueX;
     m_MaxValue1     = desc.m_MaxValueY;
     m_MaxValue2     = desc.m_MaxValueZ;
     m_MaxValue3     = desc.m_MaxValueW;
 }
Esempio n. 3
0
 public AttributeDesc(PKFxManagerImpl.EBaseType type, string name)
 {
     m_Type = type;
     m_Name = name;
 }
Esempio n. 4
0
 public AttributeDesc(PKFxManagerImpl.EBaseType type, IntPtr name)
 {
     m_Type = type;
     m_Name = Marshal.PtrToStringAnsi(name);
 }