예제 #1
0
 public void SetCoopMode(COOP_MODE_TYPE coop_mode, int client_id)
 {
     if ((coop_mode == COOP_MODE_TYPE.NONE || coop_mode == COOP_MODE_TYPE.ORIGINAL) && client_id != 0)
     {
         Log.Error(LOG.INGAME, "StageObject::SetCoopMode() Err ( client_id is invalid. )");
     }
     if (coop_mode == COOP_MODE_TYPE.ORIGINAL && !CoopStageObjectUtility.CanControll(this))
     {
         Log.Error(LOG.INGAME, "StageObject::SetCoopMode. field block obj({0}) to {1}", this, coop_mode);
     }
     else
     {
         if (coopMode != 0)
         {
             bool flag = false;
             if (CoopManager.IsValidInCoop())
             {
                 flag = true;
             }
             if (!flag)
             {
                 Log.Error(LOG.INGAME, "StageObject::SetCoopMode() Err ( not coop )");
                 return;
             }
         }
         coopMode     = coop_mode;
         coopClientId = client_id;
     }
 }
예제 #2
0
 public override void OnChangeEnableControll(bool enable)
 {
     //IL_0097: Unknown result type (might be due to invalid IL or missing references)
     if (enable && !CoopStageObjectUtility.CanControll(player))
     {
         Log.Error(LOG.INGAME, "NpcController:OnChangeEnableControll. field block enable. obj={0}", player);
         enable = false;
     }
     base.OnChangeEnableControll(enable);
     if (enable)
     {
         if (isStart && this.get_enabled() && player != null && mainCoroutine == null)
         {
             startWaitTime = parameter.startWaitTime;
             mainCoroutine = AIMain();
             this.StartCoroutine(mainCoroutine);
         }
     }
     else
     {
         if (mainCoroutine != null)
         {
             this.StopAllCoroutines();
             mainCoroutine = null;
         }
         if (isGuard)
         {
             player.ActIdle(false, -1f);
         }
     }
 }
예제 #3
0
 public void AddController <T>() where T : ControllerBase
 {
     //IL_004f: Unknown result type (might be due to invalid IL or missing references)
     if (controller == null)
     {
         if (!CoopStageObjectUtility.CanControll(this))
         {
             Log.Error(LOG.INGAME, "StageObject::AddController. field block obj({0},{1}) to {2}", this, coopMode, typeof(T));
         }
         else
         {
             this.get_gameObject().AddComponent <T>();
         }
     }
 }