技能改spine 怪物增加
This commit is contained in:
@@ -33,6 +33,7 @@ export class BuffComp extends Component {
|
||||
|
||||
start() {
|
||||
this.heroView = this.node.getComponent(HeroViewComp);
|
||||
this.in_fired(10,0)
|
||||
// this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false;
|
||||
// this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = false;
|
||||
// this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = false;
|
||||
@@ -194,6 +195,14 @@ export class BuffComp extends Component {
|
||||
this.node.getChildByName("max").active=false
|
||||
},0.8)
|
||||
}
|
||||
show_do_buff(name:string){
|
||||
var path = "game/skills/"+name;
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
let pos = v3(this.node.position.x,this.node.position.y+20,this.node.position.z);
|
||||
node.parent = this.node.parent;
|
||||
node.setPosition(pos);
|
||||
}
|
||||
dead(){
|
||||
var path = "game/skills/dead";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
@@ -230,7 +239,7 @@ export class BuffComp extends Component {
|
||||
var path = "game/skills/yun";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
node.setPosition(v3(0,90));
|
||||
node.setPosition(v3(0,0));
|
||||
node.getComponent(timedCom).time = t;
|
||||
node.getComponent(timedCom).ap = ap;
|
||||
node.parent = this.node;
|
||||
|
||||
@@ -9,7 +9,6 @@ import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label,RigidBody2D ,Node,
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroSpine } from "./HeroSpine";
|
||||
import { Hero } from "./Hero";
|
||||
import { HeroModelComp } from "./HeroModelComp";
|
||||
import { BoxSet, GameSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
@@ -23,8 +22,6 @@ import { RandomManager } from "../../../../extensions/oops-plugin-framework/asse
|
||||
import { TimerManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/TimerManager";
|
||||
import { HeroSet } from "../common/config/heroSet";
|
||||
import { BuffComp } from "./BuffComp";
|
||||
import { BossList } from "../common/config/MissionSet";
|
||||
import { Monster } from "./Mon";
|
||||
import { MonModelComp } from "./MonModelComp";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -514,9 +511,14 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
//使用max_skill
|
||||
do_skill(skill:number){
|
||||
// this.as.max()
|
||||
// this.at = 0; //共享普攻攻击cd
|
||||
this.BUFFCOMP.tooltip(3,SkillSet[skill].name,skill);
|
||||
if(SkillSet[skill].flash){
|
||||
this.as.max()
|
||||
this.scheduleOnce(()=>{
|
||||
this.BUFFCOMP.show_do_buff(SkillSet[skill].fname)
|
||||
},0.1)
|
||||
}
|
||||
switch (SkillSet[skill].tg) {
|
||||
case SkTG.self: //自己
|
||||
this.do_add_buff(this.node.getComponent(HeroViewComp),skill)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { _decorator, Component, Node, sp } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('UiHeroComp')
|
||||
export class UiHeroComp extends Component {
|
||||
h_uuid:number=0
|
||||
start() {
|
||||
|
||||
var spine = this.node.getChildByName("anm").getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
spine.setAnimation(0, 'Idle', true);
|
||||
}
|
||||
to_destroy(){
|
||||
this.node.destroy()
|
||||
|
||||
16
assets/script/game/hero/idleComp.ts
Normal file
16
assets/script/game/hero/idleComp.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { _decorator, Component, Node, sp } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('idleComp')
|
||||
export class idleComp extends Component {
|
||||
start() {
|
||||
var spine = this.node.getChildByName("anm").getComponent('sp.Skeleton') as sp.Skeleton;
|
||||
spine.setAnimation(0, 'Idle', true);
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/hero/idleComp.ts.meta
Normal file
9
assets/script/game/hero/idleComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3fc03a0b-a210-4f3e-8f82-e98a4c1d9b34",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user