first commit

This commit is contained in:
ytc1012
2025-11-18 18:38:53 +08:00
commit bea9db4488
1582 changed files with 335346 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import { _decorator, Component, Label, Node, SpriteFrame } from 'cc';
const {ccclass, property} = _decorator;
import SkillCommand from "../../skill/SkillCommand";
import { Skill } from "../../skill/SkillProxy";
import SkillIconLogic from "./SkillIconLogic";
@ccclass('SkillItemLogic')
export default class SkillItemLogic extends Component {
@property(Label)
nameLab: Label = null;
@property(Label)
limitLab: Label = null;
@property(Node)
icon:Node = null;
@property([SpriteFrame])
sps:SpriteFrame[] = [];
_skill: Skill = null;
protected onEnable():void{
}
protected updateItem(skill:Skill):void{
var conf = SkillCommand.getInstance().proxy.getSkillCfg(skill.cfgId);
this._skill = skill;
this.nameLab.string = conf.name;
this.icon.getComponent(SkillIconLogic).setData(skill, null);
this.limitLab.string = this._skill.generals.length + "/" + conf.limit;
}
}