加分动画
This commit is contained in:
@@ -8,7 +8,7 @@ export class AutoDestroy extends Laya.Script {
|
||||
public lifeTime: number = 1;
|
||||
|
||||
//组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次
|
||||
onAwake(): void {
|
||||
onStart(): void {
|
||||
if (this.lifeTime < 1) {
|
||||
this.lifeTime = 1
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { respath } from "../../constants/respath"
|
||||
import { ScoreAdd } from "../ScoreAdd"
|
||||
|
||||
export function G_ShowScoreTips(text: string, parent: any): void {
|
||||
Laya.loader.load(respath.score_add_ui_res).then((go)=>{
|
||||
Laya.loader.load(respath.score_add_ui_res()).then((go)=>{
|
||||
var prefab = go.create()
|
||||
var obj = parent.addChild(prefab)
|
||||
var Label = obj.getChildByName("offset").getChildByName("Label") as Laya.Label
|
||||
Label.text = text
|
||||
var score = parent.addChild(prefab).getComponent(ScoreAdd)
|
||||
score.onSetText(text)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user