卡组刷新 及预置广告 抽紫装, 成功后刷紫装未做
This commit is contained in:
File diff suppressed because it is too large
Load Diff
258
assets/resources/gui/anim/vipbs.anim
Normal file
258
assets/resources/gui/anim/vipbs.anim
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.AnimationClip",
|
||||||
|
"_name": "vipbs",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"embeddedPlayerGroups": []
|
||||||
|
},
|
||||||
|
"_native": "",
|
||||||
|
"sample": 50,
|
||||||
|
"speed": 1,
|
||||||
|
"wrapMode": 2,
|
||||||
|
"enableTrsBlending": false,
|
||||||
|
"_duration": 0.4,
|
||||||
|
"_hash": 500763545,
|
||||||
|
"_tracks": [
|
||||||
|
{
|
||||||
|
"__id__": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_exoticAnimation": null,
|
||||||
|
"_events": [],
|
||||||
|
"_embeddedPlayers": [],
|
||||||
|
"_additiveSettings": {
|
||||||
|
"__id__": 11
|
||||||
|
},
|
||||||
|
"_auxiliaryCurveEntries": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.VectorTrack",
|
||||||
|
"_binding": {
|
||||||
|
"__type__": "cc.animation.TrackBinding",
|
||||||
|
"path": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"proxy": null
|
||||||
|
},
|
||||||
|
"_channels": [
|
||||||
|
{
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 9
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_nComponents": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.TrackPath",
|
||||||
|
"_paths": [
|
||||||
|
"scale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.Channel",
|
||||||
|
"_curve": {
|
||||||
|
"__id__": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealCurve",
|
||||||
|
"_times": [
|
||||||
|
0,
|
||||||
|
0.2,
|
||||||
|
0.4
|
||||||
|
],
|
||||||
|
"_values": [
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1.2,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preExtrapolation": 1,
|
||||||
|
"postExtrapolation": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.Channel",
|
||||||
|
"_curve": {
|
||||||
|
"__id__": 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealCurve",
|
||||||
|
"_times": [
|
||||||
|
0,
|
||||||
|
0.2,
|
||||||
|
0.4
|
||||||
|
],
|
||||||
|
"_values": [
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1.2,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preExtrapolation": 1,
|
||||||
|
"postExtrapolation": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.Channel",
|
||||||
|
"_curve": {
|
||||||
|
"__id__": 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealCurve",
|
||||||
|
"_times": [
|
||||||
|
0,
|
||||||
|
0.2,
|
||||||
|
0.4
|
||||||
|
],
|
||||||
|
"_values": [
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealKeyframeValue",
|
||||||
|
"interpolationMode": 0,
|
||||||
|
"tangentWeightMode": 0,
|
||||||
|
"value": 1,
|
||||||
|
"rightTangent": 0,
|
||||||
|
"rightTangentWeight": 1,
|
||||||
|
"leftTangent": 0,
|
||||||
|
"leftTangentWeight": 1,
|
||||||
|
"easingMethod": 0,
|
||||||
|
"__editorExtras__": {
|
||||||
|
"tangentMode": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preExtrapolation": 1,
|
||||||
|
"postExtrapolation": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.animation.Channel",
|
||||||
|
"_curve": {
|
||||||
|
"__id__": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.RealCurve",
|
||||||
|
"_times": [],
|
||||||
|
"_values": [],
|
||||||
|
"preExtrapolation": 1,
|
||||||
|
"postExtrapolation": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.AnimationClipAdditiveSettings",
|
||||||
|
"enabled": false,
|
||||||
|
"refClip": null
|
||||||
|
}
|
||||||
|
]
|
||||||
13
assets/resources/gui/anim/vipbs.anim.meta
Normal file
13
assets/resources/gui/anim/vipbs.anim.meta
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "2.0.3",
|
||||||
|
"importer": "animation-clip",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "a3c5028a-c2fb-4299-a3bc-e174929b7ec9",
|
||||||
|
"files": [
|
||||||
|
".cconb"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"name": "vipbs"
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,7 @@ export enum GameEvent {
|
|||||||
EquipRemove = "EquipRemove",
|
EquipRemove = "EquipRemove",
|
||||||
EquipSelect = "EquipSelect",
|
EquipSelect = "EquipSelect",
|
||||||
FuncSelect = "FuncSelect",
|
FuncSelect = "FuncSelect",
|
||||||
|
RefreshCard = "RefreshCard",
|
||||||
WaveUpdate = "WaveUpdate",
|
WaveUpdate = "WaveUpdate",
|
||||||
ChangeATK = "ChangeATK",
|
ChangeATK = "ChangeATK",
|
||||||
ChangeATK_FRIEND_LIVE_CD = "ChangeATK_FRIEND_LIVE_CD",
|
ChangeATK_FRIEND_LIVE_CD = "ChangeATK_FRIEND_LIVE_CD",
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export class CardComp extends CCComp {
|
|||||||
cost_gold:number=0;
|
cost_gold:number=0;
|
||||||
onLoad(){
|
onLoad(){
|
||||||
// this.on(GameEvent.HeroSelect,this.hero_select,this)
|
// this.on(GameEvent.HeroSelect,this.hero_select,this)
|
||||||
// this.on(GameEvent.HeroSkillSelect,this.hero_skill_select,this)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@@ -107,7 +106,7 @@ export class CardComp extends CCComp {
|
|||||||
let show=this.node.getChildByName("show")
|
let show=this.node.getChildByName("show")
|
||||||
show.getChildByName("name").getChildByName("name").getComponent(Label).string=SkillSet[uuid].name
|
show.getChildByName("name").getChildByName("name").getComponent(Label).string=SkillSet[uuid].name
|
||||||
this.do_card_bg_show(SkillSet[uuid].quality)
|
this.do_card_bg_show(SkillSet[uuid].quality)
|
||||||
this.node.getChildByName("Button").getChildByName("coins").active=false
|
this.node.getChildByName("show").getChildByName("coins").active=false
|
||||||
var icon_path = "game/skills/skill_icon"
|
var icon_path = "game/skills/skill_icon"
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||||
const sprite = show.getChildByName("mask").getChildByName("skill").getComponent(Sprite);
|
const sprite = show.getChildByName("mask").getChildByName("skill").getComponent(Sprite);
|
||||||
@@ -120,7 +119,7 @@ export class CardComp extends CCComp {
|
|||||||
let show=this.node.getChildByName("show")
|
let show=this.node.getChildByName("show")
|
||||||
show.getChildByName("name").getChildByName("name").getComponent(Label).string=HeroInfo[uuid].name
|
show.getChildByName("name").getChildByName("name").getComponent(Label).string=HeroInfo[uuid].name
|
||||||
this.do_card_bg_show(HeroInfo[uuid].quality)
|
this.do_card_bg_show(HeroInfo[uuid].quality)
|
||||||
this.node.getChildByName("Button").getChildByName("coins").active=false
|
this.node.getChildByName("show").getChildByName("coins").active=false
|
||||||
// show.getChildByName("ap").active=true
|
// show.getChildByName("ap").active=true
|
||||||
// show.getChildByName("hp").active=true
|
// show.getChildByName("hp").active=true
|
||||||
// show.getChildByName("ap").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
|
// show.getChildByName("ap").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
|
||||||
@@ -200,10 +199,10 @@ export class CardComp extends CCComp {
|
|||||||
show.getChildByName("mask").getChildByName("q3").active=q==Quality.BLUE
|
show.getChildByName("mask").getChildByName("q3").active=q==Quality.BLUE
|
||||||
show.getChildByName("mask").getChildByName("q4").active=q==Quality.PURPLE
|
show.getChildByName("mask").getChildByName("q4").active=q==Quality.PURPLE
|
||||||
show.getChildByName("mask").getChildByName("q5").active=q==Quality.ORANGE
|
show.getChildByName("mask").getChildByName("q5").active=q==Quality.ORANGE
|
||||||
this.node.getChildByName("Button").getChildByName("coins").active=true
|
this.node.getChildByName("show").getChildByName("coins").active=true
|
||||||
this.node.getChildByName("Button").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
|
this.node.getChildByName("show").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
get_cost_gold(quality:number){
|
get_cost_gold(quality:number){
|
||||||
switch(quality){
|
switch(quality){
|
||||||
case Quality.GREEN:
|
case Quality.GREEN:
|
||||||
@@ -231,7 +230,7 @@ export class CardComp extends CCComp {
|
|||||||
// return "替换"
|
// return "替换"
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
return "购买"
|
return "获取"
|
||||||
}
|
}
|
||||||
reset_card(){
|
reset_card(){
|
||||||
this.cost_gold=0
|
this.cost_gold=0
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { _decorator, tween, v3 } from "cc";
|
import { _decorator, Label, tween, v3 } from "cc";
|
||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
import { CardComp } from "./CardComp";
|
import { CardComp } from "./CardComp";
|
||||||
import { cardType, getRandomCardsByType } from "../common/config/CardSet";
|
import { cardType, getRandomCardsByType } from "../common/config/CardSet";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
|
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@@ -25,7 +26,12 @@ export class CardsCompComp extends CCComp {
|
|||||||
private cardQueue: Array<{type: GameEvent, data?: any}> = [];
|
private cardQueue: Array<{type: GameEvent, data?: any}> = [];
|
||||||
/** 是否正在展示卡牌 */
|
/** 是否正在展示卡牌 */
|
||||||
private isShowing: boolean = false;
|
private isShowing: boolean = false;
|
||||||
|
//**当前卡组 */
|
||||||
|
private now_card:any=null;
|
||||||
|
//**是否正在倒计时 */
|
||||||
|
private is_countdown:boolean=false;
|
||||||
|
//**倒计时时间 */
|
||||||
|
private countdown_time:number=10;
|
||||||
/** 视图层逻辑代码分离演示 */
|
/** 视图层逻辑代码分离演示 */
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||||
@@ -103,11 +109,12 @@ export class CardsCompComp extends CCComp {
|
|||||||
|
|
||||||
const nextCard = this.cardQueue.shift();
|
const nextCard = this.cardQueue.shift();
|
||||||
this.isShowing = true;
|
this.isShowing = true;
|
||||||
|
this.now_card=nextCard
|
||||||
this.show_cards(nextCard.type, nextCard.data);
|
this.show_cards(nextCard.type, nextCard.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
show_cards(e:GameEvent,data:any){
|
show_cards(e:GameEvent,data:any,is_refresh:boolean=false){
|
||||||
this.node.getChildByName("Button").active=false
|
this.node.getChildByName("btns").getChildByName("cancel").active=false
|
||||||
switch(e){
|
switch(e){
|
||||||
case GameEvent.HeroSelect:
|
case GameEvent.HeroSelect:
|
||||||
console.log("[CardsComp]:显示英雄选择卡牌")
|
console.log("[CardsComp]:显示英雄选择卡牌")
|
||||||
@@ -119,15 +126,18 @@ export class CardsCompComp extends CCComp {
|
|||||||
break
|
break
|
||||||
case GameEvent.FuncSelect:
|
case GameEvent.FuncSelect:
|
||||||
console.log("[CardsComp]:显示功能卡牌")
|
console.log("[CardsComp]:显示功能卡牌")
|
||||||
this.node.getChildByName("Button").active=true
|
this.node.getChildByName("btns").getChildByName("cancel").active=true
|
||||||
this.func_select()
|
this.func_select()
|
||||||
break
|
break
|
||||||
case GameEvent.EquipSelect:
|
case GameEvent.EquipSelect:
|
||||||
console.log("[CardsComp]:显示装备选择卡牌")
|
console.log("[CardsComp]:显示装备选择卡牌")
|
||||||
|
this.node.getChildByName("btns").getChildByName("cancel").active=true
|
||||||
this.equip_select()
|
this.equip_select()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.show()
|
|
||||||
|
if(!is_refresh) this.show()
|
||||||
|
|
||||||
}
|
}
|
||||||
close_cards(e:GameEvent,data:any){
|
close_cards(e:GameEvent,data:any){
|
||||||
switch(e){
|
switch(e){
|
||||||
@@ -146,10 +156,12 @@ export class CardsCompComp extends CCComp {
|
|||||||
}
|
}
|
||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
show(){
|
show(){
|
||||||
|
this.node.getChildByName("vip").active=false
|
||||||
// 设置初始状态
|
// 设置初始状态
|
||||||
smc.mission.pause=true
|
smc.mission.pause=true
|
||||||
// this.node.getChildByName("Button").setPosition(v3(0, this.node.getChildByName("Button").getPosition().y, 0))
|
// this.node.getChildByName("btns").getChildByName("cancel").setPosition(v3(0, this.node.getChildByName("btns").getChildByName("cancel").getPosition().y, 0))
|
||||||
// this.node.getChildByName("top").setPosition(v3(0, this.node.getChildByName("top").getPosition().y, 0))
|
// this.node.getChildByName("top").setPosition(v3(0, this.node.getChildByName("top").getPosition().y, 0))
|
||||||
this.node.setPosition(v3(0, 0, 0));
|
this.node.setPosition(v3(0, 0, 0));
|
||||||
this.node.setScale(v3(0, 0, 1));
|
this.node.setScale(v3(0, 0, 1));
|
||||||
@@ -161,6 +173,13 @@ export class CardsCompComp extends CCComp {
|
|||||||
tween().to(0.3, { position: v3(0, 640, 0) }, { easing: 'backOut' })
|
tween().to(0.3, { position: v3(0, 640, 0) }, { easing: 'backOut' })
|
||||||
)
|
)
|
||||||
.start();
|
.start();
|
||||||
|
let vip = RandomManager.instance.getRandomInt(0,100)
|
||||||
|
console.log("[CardsComp]:vip",vip)
|
||||||
|
if(vip < 30){
|
||||||
|
this.node.getChildByName("vip").active=true
|
||||||
|
this.is_countdown=true
|
||||||
|
this.countdown_time=10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hide(){
|
hide(){
|
||||||
@@ -182,13 +201,35 @@ export class CardsCompComp extends CCComp {
|
|||||||
this.cardQueue = [];
|
this.cardQueue = [];
|
||||||
this.close_cards(GameEvent.CardsClose,null)
|
this.close_cards(GameEvent.CardsClose,null)
|
||||||
}
|
}
|
||||||
|
refresh_card(){
|
||||||
|
this.show_cards(this.now_card.type,this.now_card.data,true)
|
||||||
|
}
|
||||||
//放弃选择
|
//放弃选择
|
||||||
give_up_select(){
|
give_up_select(){
|
||||||
this.hide()
|
this.hide()
|
||||||
// let mission_data=smc.vmdata.mission_data
|
// let mission_data=smc.vmdata.mission_data
|
||||||
// mission_data.gold+=(mission_data.back_gold+mission_data.buff_back_gold) //返还金币
|
// mission_data.gold+=(mission_data.back_gold+mission_data.buff_back_gold) //返还金币
|
||||||
}
|
}
|
||||||
|
//点击看视频广告
|
||||||
|
to_do_vip(){
|
||||||
|
if(this.checkout_vip()){
|
||||||
|
console.log("[CardsComp]:vip检查通过")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//检测广告是否成功观看
|
||||||
|
checkout_vip(){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
update(dt: number) {
|
||||||
|
if(this.is_countdown){
|
||||||
|
this.countdown_time-=dt
|
||||||
|
this.node.getChildByName("vip").getChildByName("num").getComponent(Label).string=Math.floor(this.countdown_time).toString()
|
||||||
|
if(this.countdown_time<=0){
|
||||||
|
this.is_countdown=false
|
||||||
|
this.node.getChildByName("vip").active=false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||||
reset() {
|
reset() {
|
||||||
this.cardQueue = [];
|
this.cardQueue = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user