提交资源

This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-18 18:58:07 +08:00
parent 5a58823b4e
commit bc2ddf1fcd
50 changed files with 6498 additions and 38 deletions

View File

@@ -0,0 +1,43 @@
import { Label } from 'cc';
import { Sprite } from 'cc';
import { _decorator, Component, Node } from 'cc';
import { TD } from '../../../App';
import TbResource, { IconTypeEnum } from '../../../tools/TbResource';
const { ccclass, property } = _decorator;
@ccclass('ResourceIcon')
export class ResourceIcon extends Component {
//资源品质
@property(Sprite)
quality:Sprite;
//资源图标
@property(Sprite)
icon:Sprite;
//资源数量
@property(Label)
num:Label;
//设置icon
set(id:number,value:number){
let config = TD.TbGResource.get(id);
//设置ICON
TbResource.loadSpriteIcon(IconTypeEnum.,config.icon,this.icon,this);
//设置品质
TbResource.loadSpriteIcon(IconTypeEnum.,config.quality,this.quality,this);
this.num.string = ``;
if(value > 1){
//显示数量
this.num.string = `${value}`;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "8f263c37-4fff-471d-8080-0fa65f88e527",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c2a043f8-f6d7-41a1-a090-6c52eb12fce8",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,18 @@
import { _decorator, Component, Node } from 'cc';
import { ResourceIcon } from '../ResourceIcon';
const { ccclass, property } = _decorator;
@ccclass('PlayerResourceIcon')
export class PlayerResourceIcon extends Component {
@property(ResourceIcon)
icon:ResourceIcon;
//设置 ( 资源Id )
set(id:number){
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "69b494ce-f644-48e9-a9ba-f7e6e195c92d",
"files": [],
"subMetas": {},
"userData": {}
}