Exemplo n.º 1
0
        public static BTState Create(BTFsm parentFsm, System.Type type)
        {
            var newState = XScriptableObject.CreateInstance(type) as BTState;

            newState.Owner = parentFsm;
            parentFsm.AddNewState(newState);
            return(newState);
        }
Exemplo n.º 2
0
        public static BTState Create <T>(BTFsm parentFsm) where T : BTState
        {
            var newState = XScriptableObject.CreateInstance <T>();

            newState.Owner = parentFsm;
            parentFsm.AddNewState(newState);
            return(newState);
        }