| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- cc.Class({
- extends: cc.Component,
- properties: {
- CompanyNameEditbox:{
- default :null,
- type :cc.EditBox
- },
- CEONameEditbox:{
- default :null,
- type :cc.EditBox
- },
- Hint:{
- default :null,
- type :cc.Node
- },
- Stamp:{
- default :null,
- type :cc.Node
- },
- },
- Confirm:function()
- {
- var CompanyName = this.CompanyNameEditbox.string;
- var CEOName = this.CEONameEditbox.string;
- // if blank
- if(CompanyName=='' || CEOName == '')
- {
- this.Hint.active=true;
- this.schedule(function(){
- this.Hint.active=false;
- },1, 0, 0);
- return;
- }
- //confirm condition ok
- cc.sys.localStorage.setItem('PreviousStoryCompanyName', CompanyName);
- cc.sys.localStorage.setItem('PreviousStoryCEOName', CEOName);
- //init value
- this.Stamp.active=true;
- this.Stamp.opacity=0;
- this.Stamp.scale=3;
- //stamp animation
- var Duaration = 1;
- var ShowStampfadeInAnim = cc.fadeIn(Duaration);
- var ShowStampScaleAnim = cc.scaleTo(0.2,Duaration);
- this.Stamp.runAction(ShowStampfadeInAnim);
- this.Stamp.runAction(ShowStampScaleAnim);
- this.scheduleOnce(function(){
- cc.log('1111111')
- cc.director.loadScene("Game");
- },Duaration)
- }
- });
|