mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -6,12 +6,21 @@ import { API, PlayerPetOV } from '../../../consts/API';
|
||||
import { PetIconSelectShow } from '../../Consts/Pet/PetIconSelectShow';
|
||||
import PlayerPetData from '../../../data/PlayerPetData';
|
||||
import { PetEquipIcon } from '../../Consts/PetEquip/icon/PetEquipIcon';
|
||||
import { Label } from 'cc';
|
||||
import TimeUtil from '../../../../../extensions/ngame/assets/ngame/util/TimeUtil';
|
||||
import { ResourceType } from '../../../data/ResourceData';
|
||||
import JComponent from '../../../../../extensions/ngame/assets/ngame/util/components/JComponent';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
//锻造台
|
||||
@ccclass('MainForgingBench')
|
||||
export class MainForgingBench extends Component {
|
||||
export class MainForgingBench extends JComponent {
|
||||
|
||||
|
||||
//锻造等级显示
|
||||
@property(Label)
|
||||
forgingLevel:Label;
|
||||
|
||||
//锻造宠
|
||||
@property(PetIconSelectShow)
|
||||
@@ -37,6 +46,14 @@ export class MainForgingBench extends Component {
|
||||
app.event.off(PetEquipDataEnum.UPDATE_EQUIP,this.onUpdateEquip,this);
|
||||
}
|
||||
|
||||
updates(){
|
||||
if(PetEquipData.getIns().forgingUpTimeExcess){
|
||||
this.forgingLevel.string = `(锻造等级: ${PetEquipData.getIns().info.currentForgingQuality} ) ${TimeUtil.remainderString(PetEquipData.getIns().forgingBenchUpEnd)}`;
|
||||
}else{
|
||||
this.forgingLevel.string = `(锻造等级: ${PetEquipData.getIns().info.currentForgingQuality} )`;
|
||||
}
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
this.onUpdateForging();
|
||||
this.onUpdateEquip();
|
||||
@@ -77,6 +94,14 @@ export class MainForgingBench extends Component {
|
||||
|
||||
}
|
||||
|
||||
//点击升级锻造台
|
||||
async onClickUpForgingBench(){
|
||||
if(PetEquipData.getIns().forgingUpTimeExcess)
|
||||
await PetEquipData.getIns().useSpeedUpForgingBench(ResourceType.SpeedUp);
|
||||
else
|
||||
await PetEquipData.getIns().upForgingBench();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -3,23 +3,18 @@ import JNScrollViewItem from '../../../../../extensions/ngame/assets/ngame/util/
|
||||
import { GOnHookPet } from '../../../../../extensions/ngame/assets/ngame/message/proto';
|
||||
import { PetIcon } from '../../Consts/Pet/PetIcon';
|
||||
import { PetIconSelect } from '../../Consts/Pet/PetIconSelect';
|
||||
import { TablePetIconSelect } from '../../Consts/Pet/table/TablePetIconSelect';
|
||||
import { TD } from '../../../App';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainSreepsIcon')
|
||||
export class MainSreepsIcon extends JNScrollViewItem<GOnHookPet> {
|
||||
|
||||
@property(PetIconSelect)
|
||||
icon:PetIconSelect;
|
||||
@property(TablePetIconSelect)
|
||||
icon:TablePetIconSelect;
|
||||
|
||||
start(){
|
||||
this.icon.set({
|
||||
petTbId: this.data.petTbId,
|
||||
petId: 0,
|
||||
petPlayerId: 0,
|
||||
petLevel: 0,
|
||||
petStar: 0,
|
||||
petStarExp: 0
|
||||
});
|
||||
this.icon.set(TD.TbGRole.get(this.data.petTbId));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user