hch
2 天以前 da12a82814ec034922881e16090fa1d7304191c3
Main/System/Hero/UIHeroController.cs
@@ -6,11 +6,11 @@
using UnityEngine.EventSystems;
public class UIHeroController : MonoBehaviour
{
   public void Create(int _skinID, Action _onComplete = null)
   public void Create(int _skinID, float scale = 1f, Action _onComplete = null)
   {
      skinID = _skinID;
      onComplete = _onComplete;
      GameObject battleGO = ResManager.Instance.LoadAsset<GameObject>("Hero/SpineRes", "Hero_001");
      GameObject battleGO = UILoader.LoadPrefab("UIHero");
      GameObject instanceGO = null;
      if (!transform.gameObject.activeSelf)
      {
@@ -21,6 +21,7 @@
      var skinConfig = HeroSkinConfig.Get(skinID);
      skeletonGraphic.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("Hero/SpineRes/", skinConfig.SpineRes + "_SkeletonData");
      skeletonGraphic.Initialize(true);
      this.transform.localScale = Vector3.one * scale;
      spineAnimationState = skeletonGraphic.AnimationState;
      PlayAnimation(MotionName.idle, true);