"use strict";
cc._RF.push(module, '74071oM5CJOXpnbiGuz1q+p', 'changepage');
// script/changepage.js

"use strict";

cc.Class({
  "extends": cc.Component,
  properties: {
    A_cahngepagefunction: [cc.Node],
    //定义数组，多个按钮切换至多个页面 
    A_page1: cc.Node,
    //页面1
    A_page2: cc.Node //页面2

  },
  // use this for initialization
  onLoad: function onLoad() {
    this.A_page1.setPosition(0, 0); //设置节点在父节点坐标系中位置 可看Cocos api
    //这里是设置页面1的坐标为0.0

    this.A_page2.active = false; //active 指当前节点的激活状态，简单点就是隐藏和显示
    //隐藏页面2
  },
  onopenpage2: function onopenpage2() {
    //打开页面二
    this.A_page1.active = false; //隐藏页面1

    this.A_page2.active = true; //显示页面2
  },
  returnpage1: function returnpage1() //返回页面1
  {
    this.A_page1.active = true; //显示页面1

    this.A_page2.active = false; //隐藏页面2
  }
});

cc._RF.pop();