Commit 16987938 authored by 任建锋's avatar 任建锋

--

parent a09cce92
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError(data);
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
pingziFront: Entity;
pingziBack: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
pingziFront: Entity;
pingziBack: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
pingziFrontTransform:Transform;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
this.pingziFrontTransform = this.pingziFront.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
pingziFront: Entity;
pingziBack: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
pingziFrontTransform:Transform;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
this.pingziFrontTransform = this.pingziFront.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
createTween(this, this.pingziFrontTransform,true,{loop:-1})
.set({position: {x: -110}})
.to({position: {x: 110}},1000)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
/**
* Created by rockyl on 2019-04-09.
*/
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { dynamic, Entity, Tween } from "scilla/src";
import { setText } from "../entityUtils";
import { alien } from "../navigator/StackNavigator";
import Wave from 'components/animation/Wave'
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Transform } from 'scilla-components/src';
import {createTween, ease} from "scilla";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
pingziFront: Entity;
pingziBack: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
pingziFrontTransform:Transform;
pingziBackTransform:Transform;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
this.pingziFrontTransform = this.pingziFront.getComponent(Transform);
this.pingziBackTransform = this.pingziBack.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
// SingleSceneNavigator
console.log("sd")
/* var sd=createTween(this.startBtnAnimation, this.startBtnAnimation)
.to({scaleX:1.2,scaleY:1.2}, 1200) */
/* createTween(this, this.startBtnAnimation)
.set({scale: {x: 0, y: 0}, alpha: 1})
.wait(100)
.to({scale: {x: 0.8, y: 0.8}}, 800)
.to({scale: {x: 1.1, y: 1.1}, alpha: 0}, 1200); */
createTween(this, this.startBtnAnimation,true,{loop:-1})
.set({scale: {x: 1, y: 1}})
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
createTween(this, this.pingziFrontTransform,true,{loop:-1})
.set({position: {x: -110}})
.to({position: {x: 110}},1000)
createTween(this, this.pingziBackTransform,true,{loop:-1})
.set({position: {x: 47.5}})
.to({position: {x: -152.5}},1000)
//console.log(sd)
//.call(resolve);
}
private setCountText(text: string) {
setText(this.countTxt, text);
}
initGameStage() {
this.updateCountText();
}
updateCountText() {
const { element } = this.ajaxElement;
let text = ''
if (element.freeLimit > 0) {
text = `今日剩余免费次数:${element.freeLimit}次`;
} else {
text = `${element.needCredits}${window['CFG'].unitName}/次`
}
this.setCountText(text);
}
onClick_startbtn() {
/* this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); */
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.broadcast('callApi', 1, 'doJoin', {
token:tokenObj.token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}, (key: string, messageObj: any) => {
this.onGotDojoinError();
});
} else {
this.broadcast('callApi', 1, 'doJoin', {
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
});
}
}
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
}
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
}
onGot_getNgameStartStatus() {
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
//fuck 不可以循环引用
this.bubbling('fuck', 'play');
}
onGotError_getNgameStartStatus() {
console.log(this.getNgameStartStatus)
console.log('onGotError_getNgameStartStatus');
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
onDidEnter(last: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = true;
}
onDidLeave(next: string, action: alien.NavigatorAction, parameters: any): void {
this.entity.enabled = false;
}
async onWillEnter(last: string, action: alien.NavigatorAction, parameters: any) {
}
async onWillLeave(next: string, action: alien.NavigatorAction, parameters: any) {
}
onWillMount(last: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
onWillUnMount(next: string, action: alien.NavigatorAction, parameters: any): Promise<any> {
return undefined;
}
}
......@@ -95,8 +95,8 @@
"script": "components/base/Transform",
"properties": {
"position": {
"x": 375,
"y": 812,
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
......@@ -105,66 +105,190 @@
"script": "./scripts/scenes/SceneStart",
"properties": {
"ajaxElement": "dynamic|API|ajaxElement",
"countTxt": "entity|fbd33e33-ed97-4636-a0f3-450db1b21923",
"startbtn": "entity|5bcd637a-1c80-450f-b89e-5765e915bd67",
"countTxt": "entity|42cd135d-b264-40af-9b62-5b0a2a935f3b",
"startbtn": "entity|2a5fede0-40da-408d-83ad-22b985b633b2",
"doJoin": "dynamic|API|doJoin",
"getNgameStartStatus": "dynamic|API|getNgameStartStatus",
"sceneContainer": "entity|74d86361-3aa2-4ce6-ba1f-796598147075"
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9f39506e-2b9d-45a1-a842-9135a70e3511"
"sceneContainer": "entity|74d86361-3aa2-4ce6-ba1f-796598147075",
"rulebtn": "entity|4cf8cf2d-6adf-4f87-843b-617a35e35477",
"pingziFront": "entity|fd47c4af-8351-4cdc-9b88-f38127dc5e1a",
"pingziBack": "entity|c2faeb70-16a5-41bd-944c-399aa7e23847"
}
}
],
"uuid": "887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"children": [
{
"name": "Label",
"name": "BgAndImg",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 44025,
"_x": 0,
"_y": 176.66666666666669,
"x": 0,
"y": -113.33333333333331
"properties": {}
}
],
"uuid": "33688444-5b98-40db-8ac0-cccbe163b92d",
"children": [
{
"name": "Bg",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"_hashCode": 52397,
"_x": 0,
"_y": 0
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9f39506e-2b9d-45a1-a842-9135a70e3511",
"anchor": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
}
}
],
"uuid": "b21d2eb7-8b5c-4867-a0a6-62bb5d5bd995"
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "今日免费次数:0次",
"fillColor": "rgba(255, 255, 255, 1)"
}
"name": "Win",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 375,
"y": 600,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|2c1b91e5-380c-4cad-8b49-9077768484a7"
}
}
],
"uuid": "82c56a04-230c-4f9c-9873-6958e20b3aa7"
},
{
"name": "Logo",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 375,
"y": 186,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|98ca4b08-205d-471c-b891-de484ba0c0ec"
}
}
],
"uuid": "7cea08fc-530d-45d3-9ea0-2b2b36590d56"
},
{
"name": "PeopleIco",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"_hashCode": 37451,
"_x": 376,
"_y": 592,
"x": 378,
"y": 1056
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|3fd2a613-5b9b-4337-8d66-b20bc5894d29"
}
}
],
"uuid": "8fcd7042-1220-4fce-963e-0ab04ddc7bd9"
},
{
"name": "Tips",
"components": [
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 375,
"y": 1144,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8067678e-d15f-4f0d-9084-60a2e51d29bd"
}
}
],
"uuid": "387e680f-e296-4f58-a4e8-2517f9619f4d"
}
],
"uuid": "fbd33e33-ed97-4636-a0f3-450db1b21923"
]
},
{
"name": "StartButton",
"name": "RuleButton",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 44353,
"_x": 0,
"_y": 295.33333333333337,
"x": 0,
"y": 185.33333333333337
"x": 72,
"y": 32,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|41fdb6b7-506a-41ee-86fb-475d934a0553"
"texture": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a"
}
},
{
......@@ -176,60 +300,78 @@
{
"script": "components/ui/Button",
"properties": {
"disabledRes": "res|41fdb6b7-506a-41ee-86fb-475d934a0553",
"downRes": "res|41fdb6b7-506a-41ee-86fb-475d934a0553",
"upRes": "res|41fdb6b7-506a-41ee-86fb-475d934a0553",
"upRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"downRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"disabledRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"onClick": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onClick_startbtn"
"method": "onClick_rulebtn"
}
]
}
}
],
"children": [
{
"name": "label",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "",
"fillColor": "rgba(255, 255, 255, 1)"
}
}
],
"uuid": "33ea9d48-899e-4e37-bc93-38b998b4036b"
}
],
"uuid": "4cf8cf2d-6adf-4f87-843b-617a35e35477"
},
{
"name": "StartButton",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 375,
"y": 958,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "./scripts/api/SampleApi",
"script": "components/renderer/TextureRenderer",
"properties": {
"method": "POST",
"name": "doJoin",
"uri": "/hdtool/recon/doJoin",
"onError": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGotDojoinError"
}
],
"onResponse": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGotDojoin"
}
]
"texture": "res|41fdb6b7-506a-41ee-86fb-475d934a0553"
}
},
{
"script": "./scripts/api/SamplePollingApi",
"script": "components/animation/TouchZoom",
"properties": {
"name": "getNgameStartStatus",
"onError": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGotError_getNgameStartStatus",
"param": ""
}
],
"onResponse": [
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|41fdb6b7-506a-41ee-86fb-475d934a0553",
"downRes": "res|41fdb6b7-506a-41ee-86fb-475d934a0553",
"disabledRes": "res|f497c44d-3b57-499d-a5b1-497846fcb265",
"onClick": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onGot_getNgameStartStatus"
"method": "onClick_startbtn"
}
],
"uri": "/hdtool/recon/ngame/getNgameStartStatus"
]
}
}
],
......@@ -249,30 +391,28 @@
}
}
],
"uuid": "a2d8796f-4d18-4add-aa8d-0001000262fa"
"uuid": "8346d762-aa18-4d92-ae48-fb5b61f5aecb"
}
],
"uuid": "5bcd637a-1c80-450f-b89e-5765e915bd67"
"uuid": "2a5fede0-40da-408d-83ad-22b985b633b2"
},
{
"name": "RuleButton",
"name": "RecordButton",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 44695,
"_x": -314,
"_y": -632,
"x": -307.3333333333333,
"y": -758.6666666666666
"x": 687.6428571428571,
"y": 69.42857142857143,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a"
"texture": "res|07b29226-9a48-4944-93d9-605e899a9e8f"
}
},
{
......@@ -284,14 +424,14 @@
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"downRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"disabledRes": "res|9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"upRes": "res|07b29226-9a48-4944-93d9-605e899a9e8f",
"downRes": "res|07b29226-9a48-4944-93d9-605e899a9e8f",
"disabledRes": "res|07b29226-9a48-4944-93d9-605e899a9e8f",
"onClick": [
{
"entity": "entity|887e3162-ef6e-4f1e-95ba-2c94c4cbff25",
"component": 1,
"method": "onClick_rulebtn"
"method": "onClick_recordbtn"
}
]
}
......@@ -313,10 +453,322 @@
}
}
],
"uuid": "33ea9d48-899e-4e37-bc93-38b998b4036b"
"uuid": "792e6694-fd2a-433f-b702-f01d90cd8d90"
}
],
"uuid": "4cf8cf2d-6adf-4f87-843b-617a35e35477"
"uuid": "5c6e9811-b5e2-4c88-a029-502e84333261"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 375,
"y": 1072.5,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "剩余次数:3次",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 26
}
}
}
],
"uuid": "42cd135d-b264-40af-9b62-5b0a2a935f3b"
},
{
"name": "Pingzi",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 47.5,
"y": 605,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"anchor": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"width": 654,
"height": 270,
"isMask": true
}
}
],
"uuid": "02b69dcd-88e2-4c1b-988c-cf3e3a3fac56",
"children": [
{
"name": "Pingzi_back",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 175816,
"_x": -10,
"_y": 157.5,
"x": 47.5,
"y": 32.5
}
}
}
],
"uuid": "c2faeb70-16a5-41bd-944c-399aa7e23847",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": 47.5
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|a9d0833b-476a-4a6d-ab87-34cdec41f756"
}
}
],
"uuid": "b7a9d401-d72f-4488-98b0-e5271f610784"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 200,
"y": 47.5,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|a9d0833b-476a-4a6d-ab87-34cdec41f756"
}
}
],
"uuid": "d2b5c867-142e-4b6b-bcd9-f96133b86712"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 400,
"y": 47.5,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|a9d0833b-476a-4a6d-ab87-34cdec41f756"
}
}
],
"uuid": "98c29dc2-ec4c-4a41-a242-f36f400d7bd5"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 600,
"y": 47.5,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|a9d0833b-476a-4a6d-ab87-34cdec41f756"
}
}
],
"uuid": "4d6f8680-5eb8-4fa9-bd13-6c5c05a1420a"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 800,
"y": 47.5,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|a9d0833b-476a-4a6d-ab87-34cdec41f756"
}
}
],
"uuid": "f52bac1b-2550-47b1-a987-f283a3e5f61a"
}
]
},
{
"name": "Pingzi_front",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 175816,
"_x": -10,
"_y": 157.5,
"x": 110,
"y": 157.5
}
}
}
],
"uuid": "fd47c4af-8351-4cdc-9b88-f38127dc5e1a",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fd91d5ed-d6d3-4da6-9f0f-fc5206b12207"
}
}
],
"uuid": "6067e37c-ca85-4b3c-b793-be5d584ec739"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 220,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fd91d5ed-d6d3-4da6-9f0f-fc5206b12207"
}
}
],
"uuid": "f8175d37-59a4-46bf-b281-6b9d8c7e8019"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 440,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fd91d5ed-d6d3-4da6-9f0f-fc5206b12207"
}
}
],
"uuid": "e285b74a-1412-4cd6-a305-16378a030922"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"_hashCode": 172002,
"_x": 0,
"_y": 0,
"x": 660,
"y": 0
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fd91d5ed-d6d3-4da6-9f0f-fc5206b12207"
}
}
],
"uuid": "5036633c-7f33-45b8-bfd6-b713d846f555"
},
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 880,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|fd91d5ed-d6d3-4da6-9f0f-fc5206b12207"
}
}
],
"uuid": "dfc118d9-dd26-45f5-94f4-bc9b42374ff5"
}
]
}
]
}
],
"disabled": true
......@@ -327,15 +779,15 @@
{
"script": "components/base/Transform",
"properties": {
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
},
"position": {
"_hashCode": 6925,
"_x": 0,
"_y": 0
},
"pivot": {
"x": 0,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
......@@ -2416,6 +2868,26 @@
"uuid": "d5c274a4-f083-4eb2-80a4-bf62b5039de6",
"url": "singles/rule_panel/ruleBg.png"
},
{
"uuid": "a9d0833b-476a-4a6d-ab87-34cdec41f756",
"url": "singles/start_scene/jiu_bg.png"
},
{
"uuid": "fd91d5ed-d6d3-4da6-9f0f-fc5206b12207",
"url": "singles/start_scene/jiu.png"
},
{
"uuid": "98ca4b08-205d-471c-b891-de484ba0c0ec",
"url": "singles/start_scene/logo.png"
},
{
"uuid": "07b29226-9a48-4944-93d9-605e899a9e8f",
"url": "singles/start_scene/myPrizeBtn.png"
},
{
"uuid": "3fd2a613-5b9b-4337-8d66-b20bc5894d29",
"url": "singles/start_scene/people_ico.png"
},
{
"uuid": "9139f20b-e70f-4d3f-afac-4b6abaaa5d1a",
"url": "singles/start_scene/ruleBtn.png"
......@@ -2424,10 +2896,22 @@
"uuid": "9f39506e-2b9d-45a1-a842-9135a70e3511",
"url": "singles/start_scene/startBg.jpg"
},
{
"uuid": "f497c44d-3b57-499d-a5b1-497846fcb265",
"url": "singles/start_scene/startBtn_disable.png"
},
{
"uuid": "41fdb6b7-506a-41ee-86fb-475d934a0553",
"url": "singles/start_scene/startBtn.png"
},
{
"uuid": "8067678e-d15f-4f0d-9084-60a2e51d29bd",
"url": "singles/start_scene/starttips.png"
},
{
"uuid": "2c1b91e5-380c-4cad-8b49-9077768484a7",
"url": "singles/start_scene/startWinBg.png"
},
{
"uuid": "35cc7ea4-c574-409e-a29d-124b620cf5fd",
"url": "singles/warning_panel/okBtn_warn.png"
......
......@@ -17,18 +17,23 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
countTxt: Entity;
startbtn: Entity;
recordbtn: Entity;
pingziFront: Entity;
pingziBack: Entity;
rankbtn: Entity;
rulebtn: Entity;
private startBtnAnimation;
pingziFrontTransform:Transform;
pingziBackTransform:Transform;
onAwake() {
super.onAwake();
this.setCountText('');
this.startBtnAnimation = this.startbtn.getComponent(Transform);
this.pingziFrontTransform = this.pingziFront.getComponent(Transform);
this.pingziBackTransform = this.pingziBack.getComponent(Transform);
//Tween.
//egret.Tween.get(this.startBtn, {loop:true}).to({scaleX:0.9, scaleY:0.9}, 300).wait(1000).to({scaleX:1, scaleY:1}, 300);
......@@ -50,6 +55,16 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
.to({scale: {x: .9, y: .9}}, 300)
.wait(1000)
.to({scale: {x: 1, y: 1}}, 300)
createTween(this, this.pingziFrontTransform,true,{loop:-1})
.set({position: {x: -110}})
.to({position: {x: 110}},1000)
createTween(this, this.pingziBackTransform,true,{loop:-1})
.set({position: {x: 47.5}})
.to({position: {x: -152.5}},1000)
//console.log(sd)
......@@ -109,7 +124,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
});
}
onGotDojoinError(data) {
onGotDojoinError(data?) {
console.log('onGotDojoinError')
console.log(this.doJoin)
console.log(data)
......@@ -131,6 +146,11 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
this.bubbling('showDialog', 'Rule');
}
onClick_recordbtn() {
console.log('onClick_rulebtn');
//this.bubbling('showDialog', 'Rule');
}
onClick_rankbtn() {
alert('onClick_rankbtn')
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
......
{"ver":"1.0.1","uuid":"c8e3cc03-e940-414c-92c2-b89737527877","subMetas":{"jiazi":{"ver":"1.0.1","uuid":"32d836a4-df9a-4ad3-865d-6187bedc745c","rawTextureUuid":"c8e3cc03-e940-414c-92c2-b89737527877","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/jiazi.png"}
{"ver":"1.0.1","uuid":"fd91d5ed-d6d3-4da6-9f0f-fc5206b12207","subMetas":{"jiu":{"ver":"1.0.1","uuid":"a9fb78ce-39e1-4a5c-83ed-27848c63cc4a","rawTextureUuid":"fd91d5ed-d6d3-4da6-9f0f-fc5206b12207","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/jiu.png"}
{"ver":"1.0.1","uuid":"a9d0833b-476a-4a6d-ab87-34cdec41f756","subMetas":{"jiu_bg":{"ver":"1.0.1","uuid":"96693c3c-310c-44a5-8672-6deac3003e28","rawTextureUuid":"a9d0833b-476a-4a6d-ab87-34cdec41f756","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/jiu_bg.png"}
{"ver":"1.0.1","uuid":"98ca4b08-205d-471c-b891-de484ba0c0ec","subMetas":{"logo":{"ver":"1.0.1","uuid":"c446a4ba-9801-44c0-abf4-5257930696d9","rawTextureUuid":"98ca4b08-205d-471c-b891-de484ba0c0ec","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/logo.png"}
{"ver":"1.0.1","uuid":"3fd2a613-5b9b-4337-8d66-b20bc5894d29","subMetas":{"people_ico":{"ver":"1.0.1","uuid":"ca85c308-67f7-401b-a652-7d28594e2d10","rawTextureUuid":"3fd2a613-5b9b-4337-8d66-b20bc5894d29","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/people_ico.png"}
assets/singles/start_scene/ruleBtn.png

1.61 KB | W: | H:

assets/singles/start_scene/ruleBtn.png

2.46 KB | W: | H:

assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
assets/singles/start_scene/ruleBtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/start_scene/startBtn.png

21.9 KB | W: | H:

assets/singles/start_scene/startBtn.png

30.6 KB | W: | H:

assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
assets/singles/start_scene/startBtn.png
  • 2-up
  • Swipe
  • Onion skin
{"ver":"1.0.1","uuid":"f497c44d-3b57-499d-a5b1-497846fcb265","subMetas":{"startBtn_disable":{"ver":"1.0.1","uuid":"8c2d28db-b7f8-472a-8467-33cf53bbceef","rawTextureUuid":"f497c44d-3b57-499d-a5b1-497846fcb265","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/startBtn_disable.png"}
{"ver":"1.0.1","uuid":"2c1b91e5-380c-4cad-8b49-9077768484a7","subMetas":{"startWinBg":{"ver":"1.0.1","uuid":"b260ba02-9553-4570-8381-1b0fbc34ec90","rawTextureUuid":"2c1b91e5-380c-4cad-8b49-9077768484a7","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/startWinBg.png"}
{"ver":"1.0.1","uuid":"8067678e-d15f-4f0d-9084-60a2e51d29bd","subMetas":{"starttips":{"ver":"1.0.1","uuid":"4f1aa194-bc30-4c1c-9e60-11d6bcf89943","rawTextureUuid":"8067678e-d15f-4f0d-9084-60a2e51d29bd","type":"texture"}},"type":"texture","imagePath":"/Users/renjianfeng/Desktop/web/scilla-project/wwjsjf-20190619/assets/singles/start_scene/starttips.png"}
......@@ -14,20 +14,20 @@ registerDef('components/other/FullStageSize', component1);
import component2 from 'components/renderer/TextureRenderer';
registerDef('components/renderer/TextureRenderer', component2);
import component3 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component3);
import component3 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component3);
import component4 from 'components/animation/TouchZoom';
registerDef('components/animation/TouchZoom', component4);
import component4 from 'components/ui/Button';
registerDef('components/ui/Button', component4);
import component5 from 'components/ui/Button';
registerDef('components/ui/Button', component5);
import component5 from 'components/renderer/TextRenderer';
registerDef('components/renderer/TextRenderer', component5);
import component6 from 'components/other/CameraController';
registerDef('components/other/CameraController', component6);
import component6 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component6);
import component7 from 'components/renderer/RectRenderer';
registerDef('components/renderer/RectRenderer', component7);
import component7 from 'components/other/CameraController';
registerDef('components/other/CameraController', component7);
import component8 from 'components/base/TouchInterrupt';
registerDef('components/base/TouchInterrupt', component8);
......@@ -41,14 +41,14 @@ registerDef('./scripts/game/CustomTextRenderer', component10);
import component11 from '../../assets/scripts/navigator/SingleSceneNavigator';
registerDef('./scripts/navigator/SingleSceneNavigator', component11);
import component12 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component12);
import component12 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component12);
import component13 from '../../assets/scripts/scenes/SceneController';
registerDef('./scripts/scenes/SceneController', component13);
import component13 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component13);
import component14 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/scenes/SceneStart', component14);
import component14 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/api/SamplePollingApi', component14);
import component15 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/popup/Popup', component15);
......
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