mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -7,9 +7,10 @@ import JNSkeleton from "../../../../../extensions/ngame/assets/ngame/sync/frame/
|
||||
import { GFSMAnimBase } from "../fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../fsm/GFSMBase";
|
||||
import { app } from "../../../App";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import { TB } from "../../../config/data/schema";
|
||||
import GRoleValues, { GRoleAttackType } from "../values/GRoleValues";
|
||||
import GAttributeBase from "../values/attribute/GAttributeBase";
|
||||
import { GPetAminEnum } from "../anim/GPetAnim";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export enum GRoleAnimEvent{
|
||||
|
@@ -2,7 +2,7 @@ import { _decorator } from "cc";
|
||||
import GRoleBase, { GRoleAnimEvent } from "./GRoleBase";
|
||||
import { ProgressBar } from "cc";
|
||||
import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
|
||||
import { GFSMAnimBase, GFSMBattleAminEnum } from "../fsm/GFSMAnimBase";
|
||||
import { GFSMAnimBase } from "../fsm/GFSMAnimBase";
|
||||
import { GFSMDefaultAnim } from "../fsm/Default/GFSMDefaultAnim";
|
||||
import GFSMDefault from "../fsm/Default/GFSMDefault";
|
||||
import { JEasing } from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween";
|
||||
@@ -10,8 +10,10 @@ import { GAttack } from "../attack/GAttack";
|
||||
import { v2 } from "cc";
|
||||
import { GTactical } from "../../entity/GTactical";
|
||||
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import { TB } from "../../../config/data/schema";
|
||||
import { TD } from "../../../App";
|
||||
import { GPetAminEnum } from "../anim/GPetAnim";
|
||||
import { UIOpacity } from "cc";
|
||||
const { property,ccclass } = _decorator;
|
||||
|
||||
//默认角色类
|
||||
@@ -66,17 +68,22 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
//宠物死亡回调
|
||||
killBack:((role:GRoleDefault) => {})[] = [];
|
||||
|
||||
@property(UIOpacity)
|
||||
opacity:UIOpacity;
|
||||
|
||||
onSyncLoad(){
|
||||
super.onSyncLoad();
|
||||
|
||||
//监听攻击
|
||||
this.fsmAnim.addEventListener(GRoleAnimEvent.Attack,this.onAttack.bind(this));
|
||||
//监听死亡击飞
|
||||
this.fsmAnim.addStartListener(GFSMBattleAminEnum.Fly,this.onFly.bind(this));
|
||||
this.fsmAnim.addStartListener(GPetAminEnum.Fly,this.onFly.bind(this));
|
||||
}
|
||||
|
||||
//初始化
|
||||
onInit(type:number,role:TB.TbGRole,tactical:GTactical,tacticalIndex:number){
|
||||
this.opacity.opacity = 0;
|
||||
|
||||
super.init(role);
|
||||
this.type = type;
|
||||
|
||||
@@ -96,6 +103,8 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
|
||||
onSyncUpdate(dt: number,frame:JNFrameInfo, input?: {}) {
|
||||
|
||||
this.opacity.opacity = 255;
|
||||
|
||||
super.onSyncUpdate(dt,frame,input);
|
||||
|
||||
//更新技能
|
||||
|
Reference in New Issue
Block a user