修复动画文件
This commit is contained in:
@@ -4,19 +4,21 @@
|
||||
|
||||
export const CardList={
|
||||
1:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},
|
||||
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},{uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},
|
||||
|
||||
// {uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},{uuid:9010,type:1},{uuid:9011,type:1},{uuid:9012,type:1},
|
||||
],
|
||||
2:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},{uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},
|
||||
// {uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},{uuid:9010,type:1},{uuid:9011,type:1},{uuid:9012,type:1},
|
||||
],
|
||||
3:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},{uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},
|
||||
// {uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},{uuid:9010,type:1},{uuid:9011,type:1},{uuid:9012,type:1},
|
||||
],
|
||||
4:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9003,type:1},{uuid:9004,type:1},{uuid:9005,type:1},{uuid:9006,type:1},{uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},
|
||||
],
|
||||
5:[
|
||||
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
|
||||
|
||||
@@ -7,16 +7,16 @@ export const HeroSet={
|
||||
9003:{uuid: 9003,path: "k3",type: 1,level: 1,name: "战士3",atk: 4,hp: 24,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "蚂蚁"},
|
||||
9004:{uuid: 9004,path: "m1",type: 1,level: 1,name: "魔法师1",atk: 4,hp: 24,atk_dis:400,atk_cd: 2,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "蚂蚁"},
|
||||
skill: "base2",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "蚂蚁"},
|
||||
9005:{uuid: 9005,path: "m2",type: 3,level: 1,name: "魔法师2",atk: 3,hp: 18,atk_dis:400,atk_cd: 1,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "鼠"},
|
||||
skill: "base2",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "鼠"},
|
||||
9006:{uuid: 9006,path: "m3",type: 3,level: 1,name: "魔法师3",atk: 3,hp: 18,atk_dis:400,atk_cd: 2,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻速型",mon: "猫"},
|
||||
skill: "base2",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻速型",mon: "猫"},
|
||||
9007:{uuid: 9007,path: "arc1",type: 3,level: 1,name: "弓箭手1",atk: 3,hp: 18,atk_dis:500,atk_cd: 1,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "攻速型",mon: "松鼠"},
|
||||
skill: "base3",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: "攻速型",mon: "松鼠"},
|
||||
9008:{uuid: 9008,path: "arc2",type: 3,level: 2,name: "弓箭手2",atk: 4,hp: 27,atk_dis:500,atk_cd: 1,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "机械蜜蜂"},
|
||||
skill: "base3",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻速型",mon: "机械蜜蜂"},
|
||||
9009:{uuid: 9009,path: "arc3",type: 1,level: 2,name: "弓箭手3",atk: 6,hp: 36,atk_dis:500,atk_cd: 2,power: 50,speed: 30,
|
||||
skill: "base",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹰"},
|
||||
skill: "base3",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001, atktype: "攻击型",mon: "鹰"},
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export class HeroSpine extends Component {
|
||||
atk_clip: AnimationClip = null!;
|
||||
max_clip: AnimationClip = null!;
|
||||
move_clip: AnimationClip = null!;
|
||||
default_clip:string = "idle";
|
||||
default_clip:string = "move";
|
||||
|
||||
onLoad() {
|
||||
// 角色控制组件
|
||||
@@ -34,7 +34,9 @@ export class HeroSpine extends Component {
|
||||
let animation = this.animator.getComponent(Animation);
|
||||
animation.on(Animation.EventType.FINISHED, this.onAnimationEvent, this)
|
||||
}
|
||||
|
||||
protected start(): void {
|
||||
this.move();
|
||||
}
|
||||
/** 初始化动画 */
|
||||
protected initAnimator() {
|
||||
this.animator=this.node.getChildByName("anm").getComponent(Animation);
|
||||
|
||||
@@ -91,7 +91,7 @@ export class HeroViewComp extends CCComp {
|
||||
// this.BoxRang = this.node.getChildByName("range_box");
|
||||
} /** 视图层逻辑代码分离演示 */
|
||||
start () {
|
||||
this.as.idle()
|
||||
this.as.move()
|
||||
this.sprite = this.node.getChildByName("anm").getComponent(Sprite);
|
||||
// this.node.getChildByName("top").setScale(this.scale,1);
|
||||
// this.node.getChildByName("atk").setScale(this.scale,1);
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MonSpine extends Component {
|
||||
atk_clip: AnimationClip = null!;
|
||||
max_clip: AnimationClip = null!;
|
||||
move_clip: AnimationClip = null!;
|
||||
default_clip:string = "idle";
|
||||
default_clip:string = "move";
|
||||
|
||||
onLoad() {
|
||||
// 角色控制组件
|
||||
|
||||
@@ -33,7 +33,7 @@ export class Skill extends ecs.Entity {
|
||||
dis:number = 50,scale:number = 1,parent:Node,
|
||||
uuid:number=1001,atk:number =10,angle = 0,
|
||||
t_pos:Vec3 = null,run_type:number=0)
|
||||
{
|
||||
{
|
||||
var path = "game/skills/"+smc.skills[uuid].sp_name;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
|
||||
Reference in New Issue
Block a user