This commit is contained in:
PC-20230316NUNE\Administrator
2023-10-23 18:56:01 +08:00
parent ac94959a45
commit 77d44ee300
328 changed files with 16429 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
- 这里主要展示各类型节点的继承方式
- 为了不污染编辑器中的节点类型,各文件中已注释掉 @bt.ccclass(xxx),在实际使用时,需要取消注释才能向编辑器注册节点

View File

@@ -0,0 +1,11 @@
{
"ver": "1.0.2",
"importer": "text",
"imported": true,
"uuid": "bd6fb0b0-bdb8-4aca-afba-ba1d72c7aec8",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,25 @@
/*
* @Author: OreoWang
* @Email: ihc523@163.com
* @Date: 2022-04-14 12:13:53
* @LastEditors: OreoWang
* @LastEditTime: 2022-04-22 21:05:13
* @Description:
*/
import * as bt from "../main"
// @bt.ccclass("TestCondition")
export class TestCondition extends bt.Conditional {
@bt.property({
type: bt.SharedNumber,
})
count: bt.SharedNumber = null;
@bt.property({
type: bt.SharedNode,
})
target: bt.SharedNode = null;
load(): void {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "bdb1465b-c734-40ee-a4bb-3e0dcee75ae6",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,25 @@
/*
* @Author: OreoWang
* @Email: ihc523@163.com
* @Date: 2022-04-14 12:13:53
* @LastEditors: OreoWang
* @LastEditTime: 2022-04-22 13:52:20
* @Description:
*/
import * as bt from "../main"
// @bt.ccclass("TestDecorator")
export class TestDecorator extends bt.Decorator {
@bt.property({
type: bt.SharedNumber,
})
count: bt.SharedNumber = null;
@bt.property({
type: bt.SharedNode,
})
target: bt.SharedNode = null;
load(): void {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "05feb8e0-bbf9-4273-8e90-0b1a34b4f85b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,25 @@
/*
* @Author: OreoWang
* @Email: ihc523@163.com
* @Date: 2022-04-14 12:13:53
* @LastEditors: OreoWang
* @LastEditTime: 2022-04-22 13:52:26
* @Description:
*/
import * as bt from "../main"
// @bt.ccclass("TestService")
export class TestService extends bt.Service {
@bt.property({
type: bt.SharedNumber,
})
count: bt.SharedNumber = null;
@bt.property({
type: bt.SharedNode,
})
target: bt.SharedNode = null;
load(): void {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "f45f34f9-7c20-4737-803c-f63fb4b4a228",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,29 @@
/*
* @Author: OreoWang
* @Email: ihc523@163.com
* @Date: 2022-04-12 09:30:24
* @LastEditors: OreoWang
* @LastEditTime: 2022-04-22 13:52:31
* @Description:
*/
import { Node } from "cc";
import * as bt from "../main"
// @bt.ccclass("TestTask")
export class TestTask extends bt.Task {
@bt.property({
type: bt.SharedNumber,
})
count: bt.SharedNumber = null;
@bt.property({
type: bt.SharedNode,
})
targetShared: bt.SharedNode = null;
@bt.property(Node)
target: Node = null;
load(): void {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "b8a9522f-0370-4a2f-b9cd-5efa426b608b",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,12 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "2eab3d7b-55b9-496c-9ca5-9b0dd779b853",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}

View File

@@ -0,0 +1,242 @@
{
"root": {
"type": "selector",
"config": {
"type": "selector",
"label": {
"events": {},
"title": "Enemy",
"group": "composite",
"name": "Selector",
"uuid": "8a33895bcRHv7EVmZOdpDNK",
"properties": {},
"order": 0
}
},
"elements": [],
"children": [
{
"type": "selector",
"config": {
"type": "selector",
"label": {
"events": {},
"title": "追逐玩家",
"group": "composite",
"name": "Selector",
"uuid": "8a33895bcRHv7EVmZOdpDNK",
"properties": {},
"order": 3
}
},
"elements": [
{
"type": "decorator",
"config": {
"type": "decorator",
"title": "中断评估",
"order": 1,
"events": {},
"group": "decorator",
"name": "Interrupter",
"uuid": "b7632MgaNFI7po3/OStKHXa",
"properties": {
"abortType": {
"tooltip": "中断类型Self中断自身分支LowerPriority中断低优先级的兄弟分支",
"default": "3",
"TYPE": "cc.Enum",
"enum": {
"None": 0,
"Self": 1,
"LowerPriority": 2,
"Both": 3
}
}
}
}
},
{
"type": "decorator",
"config": {
"type": "decorator",
"title": "在视野中",
"order": 2,
"events": {},
"group": "decorator",
"name": "Conditional",
"uuid": "4d930L3FnhCv71nra+1BGRk",
"properties": {
"filter": {
"tooltip": "Filter by shared variable / 根据共享变量值进行条件过滤",
"default": null,
"TYPE": "bt.SharedBoolean"
}
},
"isCondition": true
}
}
],
"children": [
{
"type": "task",
"config": {
"type": "task",
"label": {
"events": {},
"title": "靠近",
"group": "task",
"name": "Task",
"uuid": "917dc/B4bBArq1QrBFaQ6gk",
"properties": {},
"order": 5
}
},
"elements": [
{
"type": "decorator",
"config": {
"type": "decorator",
"title": "不在攻击范围",
"order": 4,
"events": {},
"group": "decorator",
"name": "Conditional",
"uuid": "4d930L3FnhCv71nra+1BGRk",
"properties": {
"filter": {
"tooltip": "Filter by shared variable / 根据共享变量值进行条件过滤",
"default": null,
"TYPE": "bt.SharedBoolean"
}
},
"isCondition": true
}
}
],
"children": []
},
{
"type": "sequence",
"config": {
"type": "sequence",
"label": {
"events": {},
"title": "一次攻击",
"group": "composite",
"name": "Sequence",
"uuid": "7c895CfOwBCgKYk2gJEdRCX",
"properties": {},
"order": 6
}
},
"elements": [],
"children": [
{
"type": "task",
"config": {
"type": "task",
"label": {
"events": {},
"title": "攻击",
"group": "task",
"name": "Task",
"uuid": "917dc/B4bBArq1QrBFaQ6gk",
"properties": {},
"order": 7
}
},
"elements": [],
"children": []
},
{
"type": "task",
"config": {
"type": "task",
"label": {
"events": {},
"title": "技能CD中",
"group": "task",
"name": "Wait",
"uuid": "d6ba0cCO4hGyr03nOM9B5Vq",
"properties": {
"duration": {
"default": "cdDuration",
"TYPE": "bt.SharedNumber"
}
},
"order": 8
}
},
"elements": [],
"children": []
}
]
}
]
},
{
"type": "sequence",
"config": {
"type": "sequence",
"label": {
"events": {},
"title": "巡逻",
"group": "composite",
"name": "Sequence",
"uuid": "7c895CfOwBCgKYk2gJEdRCX",
"properties": {},
"order": 9
}
},
"elements": [],
"children": [
{
"type": "task",
"config": {
"type": "task",
"label": {
"events": {},
"title": "随机移动",
"group": "task",
"name": "Task",
"uuid": "917dc/B4bBArq1QrBFaQ6gk",
"properties": {},
"order": 10
}
},
"elements": [],
"children": []
},
{
"type": "task",
"config": {
"type": "task",
"label": {
"events": {},
"title": "原地休息",
"group": "task",
"name": "Wait",
"uuid": "d6ba0cCO4hGyr03nOM9B5Vq",
"properties": {
"duration": {
"default": "waitDuration",
"TYPE": "bt.SharedNumber"
}
},
"order": 11
}
},
"elements": [],
"children": []
}
]
}
]
},
"refs": [],
"blackboard": {
"variables": [],
"globals": []
},
"version": "1.0.0"
}

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "7ba6df50-5c69-4f73-8bed-9cbe39595fc2",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}