Commit 896777ff authored by 俞嘉婷's avatar 俞嘉婷

feat: 首页引导

parent 5bb55320
{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"734c4053-d630-4acc-ba0a-b9d7af243bf1","files":[],"subMetas":{},"userData":{"isBundle":true}}
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "690de044-72b1-4025-ae01-e3e5572ae719",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "HomeGuidePanel"
}
}
{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"6ae501bc-d5de-46e5-b27a-02e87f2c7480","files":[],"subMetas":{},"userData":{}}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1@6c48a",
"displayName": "task_btn",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1@f9941",
"displayName": "task_btn",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 168,
"height": 149,
"rawWidth": 168,
"rawHeight": 149,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-84,
-74.5,
0,
84,
-74.5,
0,
-84,
74.5,
0,
84,
74.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
149,
168,
149,
0,
0,
168,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-84,
-74.5,
0
],
"maxPos": [
84,
74.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "3d112ef8-3cf4-4b6a-b138-73ca67ed27b1@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "23354d6e-9c52-4a61-b037-4036920517bb",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "23354d6e-9c52-4a61-b037-4036920517bb@6c48a",
"displayName": "yinliu_icon",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "23354d6e-9c52-4a61-b037-4036920517bb",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "23354d6e-9c52-4a61-b037-4036920517bb@f9941",
"displayName": "yinliu_icon",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 168,
"height": 149,
"rawWidth": 168,
"rawHeight": 149,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-84,
-74.5,
0,
84,
-74.5,
0,
-84,
74.5,
0,
84,
74.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
149,
168,
149,
0,
0,
168,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-84,
-74.5,
0
],
"maxPos": [
84,
74.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "23354d6e-9c52-4a61-b037-4036920517bb@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "23354d6e-9c52-4a61-b037-4036920517bb@6c48a"
}
}
import Panel from "../../Module/Panel";
import { _decorator, Button, Node } from "cc";
import { observer } from "../store/decorators";
import { getWebData, sendWebNet, WebNetName } from "../Utils/WebNet/WebNet";
import { _asyncThrottle } from "../Utils/Utils";
import { runMainPage } from "../Scenes/runMain/runMainPage";
import store from "../store/store";
const { ccclass, property } = _decorator;
@observer
@ccclass('HomeGuidePanel')
export default class HomeGuidePanel extends Panel {
static bundle = "HomeGuidePanel";
static skin = "HomeGuidePanel";
@property(Node) step2Box: Node = null;
@property(Node) step3Box: Node = null;
@property(Node) step2ClickArea: Node = null;
@property(Node) step3ClickArea: Node = null;
onLoad() {
this.step2ClickArea.on(Button.EventType.CLICK, this.stepHandle);
this.step3ClickArea.on(Button.EventType.CLICK, this.endHandle);
}
async start() {
}
// 下一步
stepHandle = _asyncThrottle(async () => {
const { success } = await sendWebNet(WebNetName.tcs_StepBranchGuide, { branchType: store.BRANCH_TYPE })
if (success) {
this.step2Box.active = false;
this.step3Box.active = true;
}
})
// 结束
endHandle = _asyncThrottle(() => {
this.hidePanel();
runMainPage.ins.getIndex();
})
}
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"09f800d5-c274-4dae-8f6a-b59eff1ab3eb","files":[],"subMetas":{},"userData":{}}
import { _decorator, Component, easing, tween, v3 } from 'cc';
const { ccclass } = _decorator;
@ccclass('ArrowBreath')
export class ArrowBreath extends Component {
start() {
tween(this.node)
.repeatForever(
tween(this.node)
.to(0.666, { scale: v3(1.2, 1.2, 1.2) }, { easing: easing.smooth })
.to(0.666, { scale: v3(0.95, 0.95, 0.95) }, { easing: easing.smooth })
)
.start();
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "9942b178-1c26-403d-86ee-51f4936db8d1",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, easing, tween, v3 } from 'cc';
const { ccclass } = _decorator;
@ccclass('PopoverFade')
export class PopoverFade extends Component {
start() {
tween(this.node)
.repeatForever(
tween(this.node)
.delay(5)
.to(0.666, { scale: v3(0, 0, 0) }, { easing: easing.smooth })
.delay(2)
.to(0.666, { scale: v3(1, 1, 1) }, { easing: easing.smooth })
)
.start();
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "826d4ad8-5883-4003-85a8-91c2c17e261c",
"files": [],
"subMetas": {},
"userData": {}
}
......@@ -12,6 +12,7 @@ import LimitPanel from '../../Panels/LimitPanel';
import NotLoginPanel from '../../Panels/NotLoginPanel';
import { VList } from '../VList';
import { Sprite } from 'cc';
import HomeGuidePanel from '../../Panels/HomeGuidePanel';
const { ccclass, property } = _decorator;
@ccclass('runMainPage')
......@@ -43,6 +44,9 @@ export class runMainPage extends Scene {
@property(AudioClip)
bgMusic: AudioClip = null
@property(Node)
guide1: Node = null;
private static _ins: runMainPage = null;
......@@ -67,6 +71,12 @@ export class runMainPage extends Scene {
const { success, data } = await sendWebNet(WebNetName.tcs_Index);
if (success) {
this.startLab.string = `剩余次数:${data.remainJoinNum || 0}`
// 新手引导1
if (data.alreadyGuide == 0) {
this.guide1.active = true
} else if (data.alreadyGuide == 1) {
showPanel(HomeGuidePanel)
}
if (data.offlineNewAssist && data.offlineNewAssist > 0) {
showToast(`一共有${data.offlineNewAssist}位好友助力,快去任务面板领取奖励次数吧~`)
}
......@@ -138,6 +148,8 @@ export class runMainPage extends Scene {
branchType: store.BRANCH_TYPE
});
if (!success) return;
console.log(this, this.guide1)
this.guide1.active = false
}
await store.startTCS()
})
......
......@@ -28,7 +28,7 @@
"rule": "<p>以下是游戏规则:手速要快,点击红包雨。。333。。。。。。。。。。。。。。。。。。。。11111111111111sadasdadadsad5555555557777777777799999999999911111111111111111111111222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333311111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333331111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333</p><p>以下是游戏规则:手速要快,点击红包雨。。333。。。。。。。。。。。。。。。。。。。。11111111111111sadasdadadsad5555555557777777777799999999999911111111111111111111111222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333311111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333331111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333</p><p>以下是游戏规则:手速要快,点击红包雨。。333。。。。。。。。。。。。。。。。。。。。11111111111111sadasdadadsad5555555557777777777799999999999911111111111111111111111222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333311111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333331111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333</p>",
"activityStartTime": 3,
"activityEndTime": 9,
"alreadyGuide": 1,
"alreadyGuide": 2,
"totalGuide": 2
}
}
\ No newline at end of file
{
"code": "consequat ad cillum veniam",
"message": "non proident ad Ut exercitation",
"success": true,
"data": {
"alreadyGuide": 1,
"totalGuide": 3
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment