コード例 #1
0
    // Use this for initialization
    void Start()
    {
        enemies = new List <FollowPlayer>();

        temperature = fadedOutTemperature;

        colorGrading = profile.colorGrading;

        var linear = new AnimationCurve();

        linear.AddKey(0, 0);
        linear.AddKey(1, 1);
        masterCurve = new ColorGradingCurve(linear, 0, false, new Vector2(0, 1));
        redCurve    = new ColorGradingCurve(linear, 0, false, new Vector2(0, 1));
    }
コード例 #2
0
 private static void WriteColorCurve(List <string> lines, string name, ColorGradingCurve curve, int indentation)
 {
     lines.Append(name, indentation);
     lines.Append("{", indentation);
     lines.Append("Zero = " + curve.ZeroValue, indentation + 1);
     lines.Append("IsLooped = " + curve.IsLooped, indentation + 1);
     lines.Append("Bounds = " + curve.Range, indentation + 1);
     lines.Append("Curve", indentation + 1);
     lines.Append("{", indentation + 1);
     Keyframe[] keys = curve.curve.keys;
     for (int i = 0; i < keys.Length; i++)
     {
         lines.Append("Key = " + keys[i].Convert(), indentation + 2);
     }
     lines.Append("}", indentation + 1);
     lines.Append("}", indentation);
 }
コード例 #3
0
        static void Write(string ttab, string qtab, string name, ColorGradingCurve value, ColorGradingCurve defaultValue, ref List <string> data)
        {
            if (value.Equals(defaultValue))
            {
                data.Add(ttab + name);
                data.Add(ttab + "{");

                Write(qtab, "zero", value.ZeroValue, 0f, ref data);
                Write(qtab, "loop", value.IsLooped, false, ref data);
                Write(qtab, "bounds", value.Range, Vector2.zero, ref data);

                foreach (Keyframe key in value.curve.keys)
                {
                    data.Add(qtab + "key = " + key.time + ", " + key.value + ", " + key.inTangent + ", " + key.outTangent);
                }

                data.Add(ttab + "}");
            }
        }