大侠
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
492 B

import { _decorator, Component, Node, Sprite, SpriteFrame } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('MainBtnPoxy')
export class MainBtnPoxy extends Component {
@property(Node)
protected Target:Node = null;
@property(SpriteFrame)
protected show: SpriteFrame = null;
@property(SpriteFrame)
protected hide: SpriteFrame = null;
select(isOk: boolean) {
this.Target.getComponent(Sprite).spriteFrame = isOk?this.show:this.hide;
}
}