日志控制

This commit is contained in:
chen wei bo
2025-09-21 20:18:30 +08:00
parent 23c038fd14
commit 8f90c1d7cf
23 changed files with 207 additions and 178 deletions
+6 -4
View File
@@ -1,6 +1,8 @@
import { _decorator, Component, Node, tween, UIOpacity, Vec3, VideoPlayer } from 'cc';
import Utils from '../Common/Utils';
import { VideoRoleType } from '../Common/GlobalValue';
import { logger } from "db://assets/Scripts/Main/Common/Logger";
const { ccclass, property } = _decorator;
/**背景视频 */
@@ -49,14 +51,14 @@ export class BgVideo extends Component {
update(deltaTime: number) {
// if (this._isPlaying && this.vtype == VideoRoleType.Idle) {
// console.log("BgVideo 主视频时长:", this.vp.currentTime, this.vp.duration);
// logger.log("BgVideo 主视频时长:", this.vp.currentTime, this.vp.duration);
// }
}
/**播放视频 */
playVideo(remoteUrl:string, loop:boolean = false, autoIn:boolean = true) {
console.log("BgVideo 播放视频:", this.node.position)
logger.log("BgVideo 播放视频:", this.node.position)
this.vp.remoteURL = remoteUrl
this.vp.loop = loop
this.vp.stop()
@@ -69,7 +71,7 @@ export class BgVideo extends Component {
/**暂停视频 */
pauseVideo() {
console.log("BgVideo 暂停视频:", this._vtype)
logger.log("BgVideo 暂停视频:", this._vtype)
this.vp.pause()
}
/**继续播放 */
@@ -99,7 +101,7 @@ export class BgVideo extends Component {
onVideoEvent(event1:any, event2:any) {
// console.log("bgvideo BgVideo组件 event", event2, this._vtype)
// logger.log("bgvideo BgVideo组件 event", event2, this._vtype)
if (event2 == "ready-to-play") {
// if (!this._emoShow) {
// this._emoShow = true;