public void Init(Data.HeroData info) { _animator = GetComponent <Animator>(); if (_status == null) { _status = new HeroStatus(info); } Death += () => GameMng.Camera.SetCameraMode(Define.CameraMode.None); Death += () => GameMng.Input.TouchAction -= OnTouch; Death += DeathEffect; Death += () => Destroy(this.gameObject); ItemMng.Instance.SetStatus(_status); GameMng.Input.TouchAction -= OnTouch; GameMng.Input.TouchAction += OnTouch; _status.StartEquip(); UIMng.Instance.CallEvent(UIList.HUD, "RegistHero", this); FoV fov = new FoV(GameMng.Map.CurrMap, _radius); _fov = fov; }
private void HeroDBRegist() { //LowText heroText = GameMng.Table.Get(TableType.Hero); LowText heroText = TableMng.Instance.Get(TableType.Hero); for (int i = 0; i < heroText.GetCount(); i++) { Data.HeroData info = new Data.HeroData(heroText, i); _heroInfos.Add(info._name, info); _datas.Add(info._name, info); } }
public HeroStatus(Data.HeroData data) { HP = data._maxHp; MAXHP = data._maxHp; AP = data._ap; DP = data._dp; EXP = 0; MAXEXP = data._exp; LEVEL = data._level; Data = data; SPRITE = data._sprite; STATUSSPRITE = data._statusSprite; }