Пример #1
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (_character != null && _hpModule != null)
         {
             return true;
         }
         isInit = false;
         _character = Race.GetLocalCharacter();
         if (_character == null)
         {
             return false;
         }
         _hpModule = _character.GetModule <HealthPowerModule>();
         return false;
     }));
 }
Пример #2
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (!_character.IsNull() && !_levelModule.IsNull() && !_hpModule.IsNull() && !_energyModule.IsNull())
         {
             return true;
         }
         _character = Race.GetOpponentCharacter();
         if (_character.IsNull())
         {
             return false;
         }
         _levelModule = _character.GetModule <LevelModule>();
         _hpModule = _character.GetModule <HealthPowerModule>();
         _energyModule = _character.GetModule <EnergyModule>();
         return false;
     }));
 }
Пример #3
0
 void Start()
 {
     _stat  = GetModule <StatModule>();
     _hp    = GetModule <HealthPowerModule> ();
     _skill = GetModule <SkillModule> ();
 }