This commit is contained in:
honmono
2022-03-21 17:27:37 +08:00
commit 91e741a895
320 changed files with 42373 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { ComType, EntityIndex } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComAttackable)
export class ComAttackable {
public duration: number; // 攻击持续时间
public countDown: number; // 攻击剩余时间
public hurtFrame: number; // 攻击帧
public mustAttackFrame: number;
public hurted: boolean;
public dirty: boolean; //
public attack: number; // 攻击力
public hurtArea: cc.Vec2; // 攻击区域
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "7ee555b4-eed0-4207-81f5-41b51bb3bd73",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,7 @@
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComBeAttacked)
export class ComBeAttacked {
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "c3d913ea-e619-4f5e-bb18-3fe947505dda",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,9 @@
import { BT } from "../../Common/BehaviorTree";
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComBehaviorTree)
export class ComBehaviorTree {
public root: BT.NodeBase = null;
public bb: BT.BlackBoard = new BT.BlackBoard();
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "a529fff3-0126-4e53-a4c7-e5ddb6d76976",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,10 @@
import { EventBase } from "../../Struct/NodeEvent";
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComCocosNode)
export class ComCocosNode {
public node: cc.Node = null;
public loaded = false;
public events: EventBase[] = [];
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "e75ab1ce-3260-45cb-975a-9c4c1ab72f94",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,10 @@
import { ComType, EntityIndex } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComMonitor)
export class ComMonitor {
public lookLen = 0;
public lookSize = 0;
public aroundLen = 0;
public others: EntityIndex[] = [];
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "274fabed-397f-4950-b691-2c6b6b894c9f",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,12 @@
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComMovable)
export class ComMovable {
public running = false;
public speed = 0;
public points: cc.Vec2[] = [];
public pointIdx = 0;
public speedDirty = false;
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "773fd91d-89d6-499e-9488-3d85f11938a1",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,9 @@
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComNodeConfig)
export class ComNodeConfig {
id = 0; // 唯一标识
prefabUrl = ''
layer = 0; // 层级
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "ef2ff8f3-8ffa-49f6-8e55-b8ba0284a095",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,16 @@
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComRoleConfig)
export class ComRoleConfig {
public team: number;
public maxHP: number;
public lastHP: number;
public nowHP: number;
public HPDirty: boolean;
public attack: number;
public moveSpeed: number;
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "a0036aea-32a4-4b9b-a587-5262ea4cedf7",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -0,0 +1,11 @@
import { ComType } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComTransform)
export class ComTransform {
public dir = cc.v2(1, 0); //方向向量
public x = 0;
public y = 0;
public width = 0;
public height = 0;
}

View File

@@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "0bb2991a-84c5-4b22-ade6-59d2e7e97252",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}