コード例 #1
0
    internal override void SetEntryData(TimeLineEntry entry, TimeLineBehaviour timeLineBehaviour)
    {
        base.SetEntryData(entry, timeLineBehaviour);
        var iconSelector = GetComponentInChildren <ConditionalIconSelector>();

        if (entry.ParentEntry == null)
        {
            iconSelector.SetState(ConditionalIconSelector.State.CHECK);
            ConstructComparisonEntry(entry);
        }
        else if (entry.ParentEntry.ParentEntry == null)
        {
            iconSelector.SetState(ConditionalIconSelector.State.TRUE);
            ConstructEmptyEntry(entry);
        }
        else
        {
            iconSelector.SetState(ConditionalIconSelector.State.FALSE);
            ConstructEmptyEntry(entry);
        }
    }
コード例 #2
0
    internal override void SetEntryData(TimeLineEntry entry, TimeLineBehaviour timeLineBehaviour)
    {
        base.SetEntryData(entry, timeLineBehaviour);

        if (entry.ParentEntry == null)
        {
            ConstructEmptyEntry(entry);
            return;
        }

        if (entry.Parameters.TryGetValue(_distParamString, out ParameterData parameterData))
        {
            AlignParameterWidnows(new List <GameObject>()
            {
                InstantiateRefrenceValuePicker(parameterData, ParameterType.ANY)
            });
        }
        else
        {
            ConstructEmptyEntry(entry);
        }

        var button = Instantiate(_timeLine.EntryHudScriptableObject.SwitchToValueParamButton, transform).GetComponent <Button>();

        button.onClick.AddListener(() =>
        {
            if (entry.Parameters.ContainsKey(_distParamString))
            {
                entry.Parameters.Remove(_distParamString);
            }
            else
            {
                entry.Parameters.Add(_distParamString, new ParameterData());
            }
            _timeLine.Redraw();
        });
    }
コード例 #3
0
    internal virtual void SetEntryData(TimeLineEntry entry, TimeLineBehaviour timeLineBehaviour)
    {
        _createEntryWindowForType = new Dictionary <Type, CreateEntryWindowHandler>
        {
            { typeof(float), EntryWindowNum },
            { typeof(Vector2), EntryWindowVec2 },
            { typeof(string), EntryWindowString },

            { typeof(RefrenceType <float>), EntryWindowNum },
            { typeof(RefrenceType <Vector2>), EntryWindowVec2 },
            { typeof(RefrenceType <string>), EntryWindowString }
        };
        _mainTimeLine = FindObjectOfType <MainTimeLineBehaviour>();

        _subElementBehaviour = FindObjectOfType <SubElementBehaviour>();
        _entry    = entry;
        _timeLine = timeLineBehaviour;

        GetComponentInChildren <Button>().onClick.AddListener(() => timeLineBehaviour.RemoveEntry(entry));
        if (entry.IsParentingType())
        {
            _margin = _marginWithIcon;
        }
    }
コード例 #4
0
 internal override void SetEntryData(TimeLineEntry entry, TimeLineBehaviour timeLineBehaviour)
 {
     base.SetEntryData(entry, timeLineBehaviour);
     ConstructEmptyEntry(entry);
 }