hch
3 天以前 d21ab089026bfe22df1e5c36ef2d66554957c188
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using UnityEngine;
 
public class HeroModel : MonoBehaviour
{
    [SerializeField] UIHeroController heroModel;
    public int heroSkinID = 0;
    public float scale = 1;
    public string actionName = "idle";
    public bool enable = true;
 
 
    public void Start()
    {
        heroModel.Create(heroSkinID, scale);
        heroModel.PlayAnimation(actionName, true);
        heroModel.SetEnabled(enable);
    }
}