中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

做網(wǎng)站群廈門網(wǎng)站優(yōu)化

做網(wǎng)站群,廈門網(wǎng)站優(yōu)化,深圳網(wǎng)站建設(shè)公司哪里好,深圳做網(wǎng)站在去那備案進度條控制腳本,支持節(jié)點進度條,圖片進度條,進度條組件,和進度文字展示 const { ccclass, property, menu } cc._decorator;let text_type cc.Enum({"20%": 0,"1/5": 1,"差值": 2,"自定義…

進度條控制腳本,支持節(jié)點進度條,圖片進度條,進度條組件,和進度文字展示
在這里插入圖片描述
在這里插入圖片描述


const { ccclass, property, menu } = cc._decorator;let text_type = cc.Enum({"20%": 0,"1/5": 1,"差值": 2,"自定義": 3,
});
let bar_type = cc.Enum({"Sprite": 0,"ProgressBar": 1,"Node": 2,
});@ccclass
@menu("自定義組件/進度條")
export default class barNode extends cc.Component {@property({type: cc.Sprite,visible() { return this.barType == bar_type.Sprite }})spriteBar: cc.Sprite = null;@property({type: cc.ProgressBar,visible() { return this.barType == bar_type.ProgressBar }})progressBar: cc.ProgressBar = null;@property({type: cc.Node,visible() { return this.barType == bar_type.Node }})nodeBar: cc.Node = null;@property({type: cc.Float,visible() { return this.barType == bar_type.Node }})max: number = 1;@property({type: cc.Float,visible() { return this.barType == bar_type.Node }})min: number = 0;@property(cc.RichText)barDesc: cc.RichText = null;@property(cc.Label)barDesc2: cc.Label = null;@property({type: cc.Enum(bar_type),displayName: "進度條類型"})barType = bar_type.Sprite;@property({type: cc.Enum(text_type),displayName: "進度文字類型"})textType = text_type["1/5"];_width = 0;protected onLoad(): void {}init(value, limit, bar_desc?) {let desc: string = bar_desc || "[0]";let percent = value / limit;percent = percent > 1 ? 1 : percent;if (this.spriteBar && this.barType == bar_type.Sprite) this.spriteBar.fillRange = percent;if (this.progressBar && this.barType == bar_type.ProgressBar) this.progressBar.progress = (percent < 0.1 && percent != 0) ? 0.1 : percent;if (this.nodeBar && this.barType == bar_type.Node) {this.nodeBar.width = (percent && percent * this.max < this.min) ? this.min : percent * this.max;}let str = "";switch (this.textType) {case 0: str = `${this.fixForce(percent * 100, 2)}%`desc = desc.replace("[0]", str);break;case 1: str = `${value}/${limit}`;desc = desc.replace("[0]", str);break;case 2: str = `${limit - value < 0 ? 0 : limit - value}`desc = desc.replace("[0]", str);break;case 3:desc = desc.replace("[0]", value);desc = desc.replace("[1]", limit);break;}if (this.barDesc) this.barDesc.string = desc;if (this.barDesc2) this.barDesc2.string = desc;}fixForce(count, fixTo): string {let a = (count + "").split(".");let b = a[0];if (a.length > 1) b = a[0] + "." + a[1].slice(0, fixTo);if (b == "0.00" && count != 0) {if (a.length > 1) b = a[0] + "." + a[1].slice(0, 4);}return b;}
}
http://www.risenshineclean.com/news/8310.html

相關(guān)文章:

  • 做平臺的網(wǎng)站有哪些功能廣州seo顧問seocnm
  • 南京 網(wǎng)站設(shè)計怎么做推廣和宣傳
  • 自己做網(wǎng)站怎么掙錢對網(wǎng)絡(luò)營銷的認(rèn)識有哪些
  • 重慶公司章程怎么下載seo培訓(xùn)學(xué)校
  • 網(wǎng)站建設(shè)申報書短視頻廣告投放平臺
  • 一級做爰片c視頻網(wǎng)站怎么做網(wǎng)頁宣傳
  • 九江建設(shè)公司網(wǎng)站免費網(wǎng)絡(luò)推廣
  • 怎么做應(yīng)援網(wǎng)站石家莊抖音seo
  • 哪個網(wǎng)站可以做面料訂單流量精靈
  • 網(wǎng)站運營規(guī)劃百度指數(shù)怎么看
  • 廈門網(wǎng)站建設(shè)公司哪家好河南疫情最新消息
  • 手機app是什么意思seo的范疇是什么
  • windows做網(wǎng)站服務(wù)器嗎新型網(wǎng)絡(luò)營銷方式
  • 制作動態(tài)網(wǎng)頁的軟件seo免費優(yōu)化網(wǎng)址軟件
  • 制定網(wǎng)站建設(shè)方案十大接單平臺
  • 館陶縣網(wǎng)站怎么有自己的網(wǎng)站
  • 怎樣做京東網(wǎng)站最新seo新手教程
  • 日用品企業(yè)網(wǎng)站建設(shè)萬能軟文范例800字
  • 測試網(wǎng)站兼容大數(shù)據(jù)是干什么的
  • 太原網(wǎng)站制作費用金戈枸櫞酸西地那非片
  • 400全國服務(wù)熱線代理順德手機網(wǎng)站建設(shè)sem推廣計劃
  • 金山網(wǎng)站制作百度業(yè)務(wù)范圍
  • 浦東新區(qū)專業(yè)做網(wǎng)站seo推廣軟件排行榜
  • 婁底企業(yè)網(wǎng)站建設(shè)制作百度免費推廣登錄入口
  • 門戶網(wǎng)站建設(shè)運行環(huán)境要求每日精選12條新聞
  • wordpress中文分類問題多地優(yōu)化完善疫情防控措施
  • 自己做網(wǎng)站怎么修改語言寧波seo網(wǎng)站
  • 香港網(wǎng)站域名查詢百度推廣關(guān)鍵詞匹配模式
  • 網(wǎng)站需要怎么做推廣發(fā)布任務(wù)平臺app下載
  • 自己可以建設(shè)一個網(wǎng)站要錢游戲推廣可以做嗎