Example #1
0
    protected override void OnShow(object userData)
    {
        base.OnShow(userData);

        fightEntityData = userData as FightEntityData;
        if (fightEntityData == null)
        {
            Log.Error("fightEntityData is invalid.");
            return;
        }

        // CachedTransform.localScale = Vector3.one;

        manualWeapons.Clear();
        autoWeapons.Clear();
        skillWeapons.Clear();

        /* 附加血量条 */
        PowerBarData hpBarData = new PowerBarData(EntityExtension.GenerateSerialId(), 1, this.Id, CampType.Player);

        EntityExtension.ShowPowerBar(typeof(PowerBar), "PowerBarGroup", hpBarData);
    }