Example #1
0
 private void Start()
 {
     unitProperty.Level = exp.CurrLevel;
     unitProperty.UpdateValue();
     if (isPlayer)
     {
         GlobalEvent.hpChangeEvent(unitProperty.hp.CurrValue, unitProperty.hp.MaxValue);
         GlobalEvent.mpChangeEvent(unitProperty.mp.CurrValue, unitProperty.mp.MaxValue);
         GlobalEvent.expChangeEvent(exp.CurrExp, exp.NextLevelNeedExp(), exp.CurrLevel);
         GlobalEvent.rolePropertyChangeEvent(this);
     }
     ani = GetComponent <Animator>();
     GlobalEvent.playDeadAniEvent = () => ani.Play("Death");
 }