Exemplo n.º 1
0
    /*
     * MapEvent logic
     */

    public MapEvent(JSONNode node)
    {
        _time       = node["_time"].AsFloat; //KIIIIWIIIIII
        _type       = node["_type"].AsInt;
        _value      = node["_value"].AsInt;
        _customData = node["_customData"];
        if (node["_customData"]["_lightGradient"] != null)
        {
            _lightGradient = new ChromaGradient(node["_customData"]["_lightGradient"]);
        }
    }
Exemplo n.º 2
0
    public MapEvent(float time, int type, int value, JSONNode customData = null)
    {
        _time       = time;
        _type       = type;
        _value      = value;
        _customData = customData;

        if (_customData != null && _customData.HasKey("_lightGradient"))
        {
            _lightGradient = new ChromaGradient(_customData["_lightGradient"]);
        }
    }