Пример #1
0
 void Start()
 {
     useBtn.onClick.AddListener(() => {
         var opponentNetIds = Race.GetOpponentCharacterNetIds();
         skill.targetNetIds = opponentNetIds;
         skill.ownNetId     = Race.GetLocalCharacter().netId.Value;
         _skillModule.CmdUse(skill);
     });
 }
Пример #2
0
 void Start()
 {
     useBtn.onClick.AddListener(() => {
         var opponentNetIds = Race.GetOpponentCharacterNetIds();
         item.targetNetIds  = opponentNetIds;
         item.ownNetId      = Race.GetLocalCharacter().netId.Value;
         _bagModule.CmdUse(item);
     });
 }
Пример #3
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (!_character.IsNull())
         {
             return true;
         }
         _character = Race.GetLocalCharacter();
         return false;
     }));
 }
Пример #4
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (_character != null && _statModule != null)
         {
             return true;
         }
         _character = Race.GetLocalCharacter();
         if (_character == null)
         {
             return false;
         }
         _statModule = _character.GetModule <StatModule> ();
         return false;
     }));
 }
Пример #5
0
        void Update()
        {
            if (!NetworkHelper.instance.TryToConnect(() => {
                if (_character != null)
                {
                    return(true);
                }
                _character = Race.GetLocalCharacter();
                return(false);
            }))
            {
                return;
            }

            CreateItems();
        }
Пример #6
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (!_character.IsNull() && !_statModule.IsNull())
         {
             return true;
         }
         _character = Race.GetLocalCharacter();
         if (_character.IsNull())
         {
             return false;
         }
         _statModule = _character.GetModule <StatModule> ();
         return false;
     }));
 }
Пример #7
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;
     }));
 }
Пример #8
0
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() =>
     {
         if (!_character.IsNull() && !_countdownModule.IsNull() && !_refereeModule.IsNull())
         {
             return true;
         }
         _character = Race.GetLocalCharacter();
         if (_character.IsNull())
         {
             return false;
         }
         _countdownModule = _character.GetModule <CountdownNetworkModule>();
         _refereeModule = _character.GetModule <RefereeModule>();
         return false;
     }));
 }
 bool TryToConnect()
 {
     return(NetworkHelper.instance.TryToConnect(() => {
         if (!_character.IsNull() && !_levelModule.IsNull() && !_hpModule.IsNull() && !_energyModule.IsNull())
         {
             return true;
         }
         _character = Race.GetLocalCharacter();
         if (_character.IsNull())
         {
             return false;
         }
         _levelModule = _character.GetModule <LevelModule>();
         _hpModule = _character.GetModule <HealthPowerModule>();
         _energyModule = _character.GetModule <EnergyModule>();
         return false;
     }));
 }
Пример #10
0
 void Update()
 {
     if (!NetworkHelper.instance.TryToConnect(() => {
         if (_character != null && _skillModule != null)
         {
             return(true);
         }
         _character = Race.GetLocalCharacter();
         if (_character == null)
         {
             return(false);
         }
         _skillModule = _character.GetModule <SkillModule>();
         return(false);
     }))
     {
         return;
     }
 }