// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NodePage extends cc.Component {
    
    @property(cc.Sprite)
    imageNode: cc.Sprite = null;

    @property(cc.SpriteFrame)
    sprirteActive: cc.SpriteFrame = null;
   
    @property(cc.SpriteFrame)
    sprirteDeActive: cc.SpriteFrame = null;


    activeNode(){
        this.imageNode.spriteFrame = this.sprirteActive;
    }

    deActiveNode(){
        this.imageNode.spriteFrame = this.sprirteDeActive;
    }

}
