123456789101112131415161718192021222324252627282930313233 |
- import { _decorator, Component, Node } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('content_rule_and_tips')
- export class content_rule_and_tips extends Component {
- @property(Node) btn_tips:Node = null;
- @property(Node) btn_rule:Node = null;
- private m_tips_call_back = null;
- private m_rule_call_back = null;
- public initView(tips_call,rule_call,isShowRule){
- this.m_tips_call_back = tips_call;
- this.m_rule_call_back = rule_call;
- if(!isShowRule){
- this.btn_rule.active = false;
- }
- this.btn_tips.on(Node.EventType.TOUCH_END,()=>{
- if(this.m_tips_call_back!=null){
- this.m_tips_call_back()
- }
- })
- this.btn_rule.on(Node.EventType.TOUCH_END,()=>{
- if(this.m_rule_call_back!=null){
- this.m_rule_call_back()
- }
- })
- }
- public showRuleBtn(){
- this.btn_rule.active = true;
- }
- }
|