1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import { _decorator, Component, Node } from 'cc';
- import { buff_time_count } from './buff_time_count';
- const { ccclass, property } = _decorator;
- @ccclass('buff_show')
- export class buff_show extends Component {
- @property(Node) icon_buff_xi:Node = null;
- @property(Node) icon_buff_xing:Node = null;
- @property(Node) icon_buff_dun:Node = null;
- public initView(){
- this.icon_buff_xi.active = false;
- this.icon_buff_xing.active = false;
- this.icon_buff_dun.active = false;
- }
- public showBuffXi(cb,time:number){
- this.icon_buff_xi.getComponent(buff_time_count).startBuffTimeCount(cb,time)
- this.icon_buff_xi.active = true;
- }
- public hideBuffXi(){
- this.icon_buff_xi.getComponent(buff_time_count).cancelTimeCount()
- this.icon_buff_xi.active = false;
- }
- public showBuffXing(cb,time:number){
- this.icon_buff_xing.getComponent(buff_time_count).startBuffTimeCount(cb,time)
- this.icon_buff_xing.active = true;
- }
- public hideBuffXing(){
- this.icon_buff_xing.getComponent(buff_time_count).cancelTimeCount()
- this.icon_buff_xing.active = false;
- }
- public showBuffDun(cb,time:number){
- this.icon_buff_dun.getComponent(buff_time_count).startBuffTimeCount(cb,time)
- this.icon_buff_dun.active = true;
- }
- public hideBuffDun(){
- this.icon_buff_dun.getComponent(buff_time_count).cancelTimeCount()
- this.icon_buff_dun.active = false;
- }
- public getBuffXing(){
- return this.icon_buff_xing
- }
- public getBuffXi(){
- return this.icon_buff_xi
- }
- public getBuffDun(){
- return this.icon_buff_dun
- }
- }
|