//Ui and Ally Processing
 public void HandlePartyMemberWOutAllies(PartyManager _partyMan, AllyMember _lAlly, bool _onDeath)
 {
     if (_onDeath && _partyMan.bIsCurrentPlayerCommander)
     {
         Debug.Log("All player allies are dead, Game Over!");
         gamemaster.CallEventGameOver();
         var _enemyCom = FindEnemyCommander(_partyMan);
         if (_enemyCom)
         {
             var _enemy = _enemyCom.FindPartyMembers();
             SetCameraCharacter(_enemy);
             SetUiTargetAlly(_enemy);
         }
     }
     else if (_onDeath && isEveryEnemyDead())
     {
         Debug.Log("All enemies are dead, you won!");
         gamemaster.CallEventAllEnemiesAreDead();
     }
 }
        //protected virtual void TogglebIsShooting(bool _enable)
        //{
        //    bIsShooting = _enable;
        //}

        protected virtual void HandleAllySwitch(PartyManager _party, AllyMember _toSet, AllyMember _current)
        {
        }
 protected void HandleNoPartyMembers(PartyManager _partyMan, AllyMember _lAlly, bool _onDeath)
 {
     AllyInCommand = null;
     gamemode.HandlePartyMemberWOutAllies(_partyMan, _lAlly, _onDeath);
 }
Esempio n. 4
0
 protected override void OnRegisterUiTarget(AllyMember _target, AllyEventHandler _handler, PartyManager _party)
 {
     base.OnRegisterUiTarget(_target, _handler, _party);
     _handler.OnAmmoChanged   += OnAmmoChanged;
     _handler.OnWeaponChanged += OnWeaponChanged;
     UpdateWeaponUiGameObjects(uiTargetHandler.MyEquippedType);
 }
Esempio n. 5
0
 public void CallOnDeregisterUiTarget(AllyMember _target, AllyEventHandler _eventHandler, PartyManager _party)
 {
     if (OnDeregisterUiTarget != null)
     {
         OnDeregisterUiTarget(_target, _eventHandler, _party);
     }
 }
 protected virtual void OnCheckToDeregisterUiTarget(AllyMember _target, AllyEventHandler _handler, PartyManager _party)
 {
     if (_target == currentUiTarget && bHasRegisteredTarget)
     {
         OnDeregisterUiTarget(_target, _handler);
     }
 }
 protected virtual void OnRegisterUiTarget(AllyMember _target, AllyEventHandler _handler, PartyManager _party)
 {
     currentUiTarget      = _target;
     bHasRegisteredTarget = true;
 }