修正代码格式
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
{
|
||||
"_$type": "cd70cd5e-b4cd-4277-ac0a-2224cfbe89ac",
|
||||
"scriptPath": "../src/models/UIManager.ts",
|
||||
"debug": true,
|
||||
"debug": false,
|
||||
"mask": {
|
||||
"_$ref": "2668mvhf"
|
||||
},
|
||||
@@ -64,7 +64,8 @@
|
||||
"_$comp": [
|
||||
{
|
||||
"_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17",
|
||||
"scriptPath": "../src/views/common/CommonHover.ts"
|
||||
"scriptPath": "../src/views/common/CommonHover.ts",
|
||||
"hoverAlpha": true
|
||||
}
|
||||
],
|
||||
"_$child": [
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { config } from "./constants/config"
|
||||
import { respath } from "./constants/respath"
|
||||
import { DCManager } from "./models/DCManager"
|
||||
import { LevelManager } from "./models/LevelManager"
|
||||
@@ -8,8 +7,6 @@ const { regClass } = Laya
|
||||
|
||||
@regClass()
|
||||
export class Main extends Laya.Script {
|
||||
|
||||
|
||||
onAwake() {
|
||||
console.log("Game onAwake")
|
||||
DCManager.getInstance().init()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { DOBlock } from "../models/DOBlock"
|
||||
import { config } from "../constants/config"
|
||||
import { G_ShowScoreTips } from "../views/common/GUITips"
|
||||
|
||||
const { regClass, property } = Laya
|
||||
|
||||
@@ -136,7 +136,6 @@ export class Home extends Laya.Script {
|
||||
this.btn_go.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public onClickNew(_evt: Laya.Event): void {
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
const { regClass, property } = Laya;
|
||||
const { regClass, property } = Laya
|
||||
|
||||
@regClass()
|
||||
export class CommonHover extends Laya.Script {
|
||||
declare owner : Laya.Box;
|
||||
declare owner: Laya.Box
|
||||
|
||||
@property(Boolean)
|
||||
public hoverAlpha: boolean = true
|
||||
|
||||
|
||||
onAwake(): void {
|
||||
this.owner.on(Laya.Event.MOUSE_OVER, this, ()=>{
|
||||
Laya.Render.canvas.style.cursor = "pointer"
|
||||
if (this.hoverAlpha) {
|
||||
this.owner.alpha = 0.7
|
||||
}
|
||||
})
|
||||
this.owner.on(Laya.Event.MOUSE_OUT, this, ()=>{
|
||||
Laya.Render.canvas.style.cursor = ""
|
||||
if (this.hoverAlpha) {
|
||||
this.owner.alpha = 1
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
@property(Boolean)
|
||||
public hoverAlpha: boolean = true
|
||||
|
||||
onAwake(): void {
|
||||
this.owner.on(Laya.Event.MOUSE_OVER, this, () => {
|
||||
Laya.Render.canvas.style.cursor = "pointer"
|
||||
if (this.hoverAlpha) {
|
||||
this.owner.alpha = 0.7
|
||||
}
|
||||
})
|
||||
this.owner.on(Laya.Event.MOUSE_OUT, this, () => {
|
||||
Laya.Render.canvas.style.cursor = ""
|
||||
if (this.hoverAlpha) {
|
||||
this.owner.alpha = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import { config } from "../../constants/config"
|
||||
|
||||
const { regClass, property } = Laya
|
||||
|
||||
@regClass()
|
||||
@@ -48,7 +46,7 @@ export class CalendarUnit extends Laya.Script {
|
||||
|
||||
// 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次
|
||||
onAwake(): void {
|
||||
this.pieSize = this.sprite_pie.width /2
|
||||
this.pieSize = this.sprite_pie.width / 2
|
||||
}
|
||||
|
||||
public setCalendarUnit(year: number, month: number, day: number, open: boolean, progress: number, handler: any, func: any): void {
|
||||
|
||||
Reference in New Issue
Block a user