import { _decorator, Color, Component, Label, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('LevelLabel')
export class LevelLabel extends Component 
{
    @property({type: Label, group: "Level Num Text"})
    public m_LevelNumText: Label;

    @property({type: Color, group: "Level Num Text"})
    private unlockedTextColor;

    @property({type: Color, group: "Level Num Text"})
    private lockedTextColor;
    
    public fn_Init(lvlNum: string)
    {
        this.m_LevelNumText.string = lvlNum;
    }

    public fn_SetLevelLockState(unlocked: boolean)
    {
        this.m_LevelNumText.color = unlocked ? this.unlockedTextColor : this.lockedTextColor;
    }
}

