角色动画 确定

This commit is contained in:
2024-08-26 07:33:26 +08:00
parent 68d7077e56
commit 4f96558d36
111 changed files with 54661 additions and 1391 deletions

View File

@@ -1,6 +1,7 @@
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { BoxSet } from "../common/config/BoxSet";
import { SkillSet } from "../common/config/SkillSet";
import { smc } from "../common/SingletonModuleComp";
import { SkillCom } from "./SkillCom";
import { instantiate, Node, Prefab, Vec3 ,tween, v3,animation,Label,resources,SpriteFrame,Sprite} from "cc";
@@ -28,8 +29,8 @@ export class Skill extends ecs.Entity {
this.remove(SkillCom);
super.destroy();
}
load(pos: Vec3 = Vec3.ZERO,speed:number = 100,dis:number = 50,scale:number = 1,parent:Node,sp_name:string = "base",atk:number =10,angle = 0,t_pos:Vec3 = null) {
var path = "game/skills/"+sp_name;
load(pos: Vec3 = Vec3.ZERO,speed:number = 100,dis:number = 50,scale:number = 1,parent:Node,uuid:number=1001,atk:number =10,angle = 0,t_pos:Vec3 = null) {
var path = "game/skills/"+SkillSet[uuid].sp_name;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
@@ -43,6 +44,7 @@ export class Skill extends ecs.Entity {
sv.atk = atk;
sv.angle = angle;
sv.t_pos = t_pos;
sv.type = SkillSet[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG;
if(scale == 1){
sv.box_group=BoxSet.HERO