Esempio n. 1
0
 public ThingPartStateHistoryEntry(ThingPartState state)
 {
     position = state.position;
     rotation = state.rotation;
     scale    = state.scale;
     color    = state.color;
 }
Esempio n. 2
0
    static string GetStateParticleSystemJson(ThingPart thingPart, ThingPartState state)
    {
        string s = "";

        s += "\"c\":" + JsonHelper.GetJson(state.particleSystemColor);
        bool withOnlyAlphaSetting = Managers.thingManager.IsParticleSystemTypeWithOnlyAlphaSetting(thingPart.particleSystemType);

        foreach (KeyValuePair <ParticleSystemProperty, string> item in Managers.thingManager.particleSystemPropertyAbbreviations)
        {
            if (!withOnlyAlphaSetting || item.Key == ParticleSystemProperty.Alpha)
            {
                s += ",\"" + item.Value + "\":" + state.particleSystemProperty[item.Key];
            }
        }
        return(s);
    }
Esempio n. 3
0
    static string GetStateTextureJson(ThingPart thingPart, ThingPartState state, int index)
    {
        string s = "";

        s += "\"c\":" + JsonHelper.GetJson(state.textureColors[index]);
        bool withOnlyAlphaSetting = Managers.thingManager.IsTextureTypeWithOnlyAlphaSetting(thingPart.textureTypes[index]);

        foreach (KeyValuePair <TextureProperty, string> item in Managers.thingManager.texturePropertyAbbreviations)
        {
            if (!withOnlyAlphaSetting || item.Key == TextureProperty.Strength)
            {
                s += ",\"" + item.Value + "\":" + state.textureProperties[index][item.Key];
            }
        }
        return(s);
    }