コード例 #1
0
    public void Reset()
    {
        Rect statusRect = new Rect(Style.Rect.position.x + Style.Rect.width - (Style.Rect.height / 2.5f * 2), Style.Rect.position.y + Style.Rect.height / 2.5f * 0.5f, Style.Rect.height / 2.5f, Style.Rect.height / 2.5f);

        m_Status   = new NodeStatusStyles(statusRect);
        _curStyle  = Style.NormalStyle;
        _curStatus = m_Status.NotWork;
        //_initialNodeSize = Style.Rect.size;
    }
コード例 #2
0
    public void InitEditorNode(NodeEditorStyle style)
    {
        this.Style = style;
        Rect statusRect = new Rect(Style.Rect.position.x + Style.Rect.width - (Style.Rect.height / 2.5f * 2), Style.Rect.position.y + Style.Rect.height / 2.5f * 0.5f, Style.Rect.height / 2.5f, Style.Rect.height / 2.5f);

        m_Status         = new NodeStatusStyles(statusRect);
        _curStyle        = Style.NormalStyle;
        _curStatus       = m_Status.NotWork;
        _descriptionRect = new Rect(Style.Rect.position + new Vector2(-Style.Rect.width * 0.5f, Style.Rect.height), new Vector2(Style.Rect.width * 2, Style.Rect.height * 0.7f));
        //_initialNodeSize = Style.Rect.size;
        //资产资源名
        name = Name;
    }