示例#1
0
        //public static BTNode<T> CreateNode( T state )
        //{
        //    var t = CreateInstance(typeof( BTNode<T> )) as BTNode<T>;

        //    if( typeof(T).GetCustomAttributes( typeof( StateTitleAttribute ), true ).Length > 0 )
        //    {
        //        t.isCustomState = true;
        //    }
        //    return t;
        //}

        public BTNode(BTState btState)
        {
            this.BtState = btState;
            if (btState.GetType().GetCustomAttributes(typeof(StateTitleAttribute), true).Length > 0)
            {
                isCustomState = true;
            }
        }
示例#2
0
 public void OpenScript()
 {
     BTEditorWindow.OpenTypeScript(BtState.GetType());
 }