提交代码

This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-17 18:36:59 +08:00
parent 8ad2313502
commit 1b4db3c980
46 changed files with 1518 additions and 667 deletions

View File

@@ -1,12 +1,9 @@
import { _decorator } from "cc";
import GFSMDefault from "../../fsm/Default/GFSMDefault";
import { GFSMDefaultAnim } from "../../fsm/Default/GFSMDefaultAnim";
import { GFSMAnimBase } from "../../fsm/GFSMAnimBase";
import GFSMBase from "../../fsm/GFSMBase";
import GRoleBase from "../GRoleBase";
import { ProgressBar } from "cc";
import { TB } from "../../../../config/data/schema";
import { GPetAminEnum } from "../../anim/GPetAnim";
import { v3 } from "cc";
import GFSMCampGuardianAnim from "../../fsm/CampGuardian/GFSMCampGuardianAnim";
const { property,ccclass } = _decorator;

View File

@@ -113,6 +113,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
public init(role:TB.TbGRole){
console.log("初始化宠物",!!this.spine,!!(app.battleRes.getRoleSpine(role.id)));
this.spine.skeletonData = app.battleRes.getRoleSpine(role.id);
this.node.scale = v3(role.roleScale,role.roleScale,role.roleScale);
}
//创建一个状态机

View File

@@ -1,7 +1,9 @@
import { TD, app } from "../../../App";
import { TbGEntity } from "../../../config/data/schema";
import { PetEquip, PlayerPetOV } from "../../../consts/API";
import GRoleValues from "./GRoleValues";
import GAttribute from "./attribute/GAttribute";
import GDefaultAttribute from "./attribute/default/GDefaultAttribute";
import GPetAttribute from "./attribute/role/GPetAttribute";
import GPetEquipAttribute from "./attribute/role/GPetEquipAttribute";
@@ -84,4 +86,13 @@ export default class GAttributeData{
}
//根据属性返回属性
static TAttributeValue(info:TbGEntity.TAttributeValue[]){
let value = new GAttribute();
value.add(new GDefaultAttribute().set(info))
return value;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "a5050452-3587-4ccd-a324-f7e7e1fb9cce",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,24 @@
import { TD } from "../../../../../App";
import { TbGEntity } from "../../../../../config/data/schema";
import GAttributeBase from "../GAttributeBase";
//默认属性
export default class GDefaultAttribute extends GAttributeBase{
update() { }
set(info:TbGEntity.TAttributeValue[]){
this.attributes = {};
//获取全部属性信息
TD.TbGAttribute.getDataList().forEach(attr => {
//默认 0
this.attributes[attr.id] = 0;
});
info.forEach(item => this.attributes[item.id] += item.value);
return this;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "770fb39c-b04f-4c1c-9dff-105f01b099f6",
"files": [],
"subMetas": {},
"userData": {}
}