public void LoadHero(HeroVO hero)
 {
     if (hero == null)
     {
         return;
     }
     CResourceManager.InstantiatePrefab(hero.Address, HeroRoot);
 }
Exemple #2
0
        public static HeroVO Load(string name)
        {
            var    slot = GetSaveSlot(name);
            HeroVO vo   = null;

            if (ES3.KeyExists(slot))
            {
                vo = ES3.Load <HeroVO>(slot);
            }

            return(vo);
        }
Exemple #3
0
        public void CreateHero(string name, int actorClass, int actorRace)
        {
            HeroVO vo = new HeroVO
            {
                Name           = name,
                Class          = actorClass,
                Race           = actorRace,
                Level          = 1,
                AttributePoint = 5,
                SkillPoint     = 0,
            };

            vo.Address = AssetManager.GetHeroModelAddress(vo.RaceEnum, vo.ClassEnum);
            Hero       = vo;
            SaveHero();
        }
Exemple #4
0
        public override void OnReveal()
        {
            base.OnReveal();

            if (m_args == null)
            {
                Debug.LogError("m_args should not be null when open UI_HeroInfo panel");
                return;
            }

            m_vo = m_args[0] as HeroVO;
            if (m_vo == null)
            {
                Debug.LogError("m_args should not be null when open UI_HeroInfo panel");
                return;
            }

            SetAttibute();
        }