コード例 #1
0
 public static void TransfarOwner(StageObject obj, int owner_client_id)
 {
     //IL_0065: Unknown result type (might be due to invalid IL or missing references)
     if (MonoBehaviourSingleton <CoopManager> .I.coopMyClient.clientId == owner_client_id)
     {
         if (!CanControll(obj))
         {
             Log.Error(LOG.COOP, "TransfarOwner. field block obj({0}) to original", obj);
         }
         else
         {
             obj.SetCoopMode(StageObject.COOP_MODE_TYPE.ORIGINAL, 0);
             Character character = obj as Character;
             if (character != null)
             {
                 SetAI(character);
                 if (!character.isSetAppearPos)
                 {
                     character.SetAppearPos(character._position);
                 }
                 character.characterSender.SendInitialize(0);
             }
         }
     }
     else
     {
         if (obj is Player)
         {
             obj.SetCoopMode(StageObject.COOP_MODE_TYPE.PUPPET, owner_client_id);
         }
         else
         {
             obj.SetCoopMode(StageObject.COOP_MODE_TYPE.MIRROR, owner_client_id);
         }
         obj.isCoopInitialized = false;
         Character character2 = obj as Character;
         if (character2 != null)
         {
             character2.RemoveController();
             character2.SafeActIdle();
             character2.characterReceiver.SetFilterMode(ObjectPacketReceiver.FILTER_MODE.WAIT_INITIALIZE);
         }
     }
 }
コード例 #2
0
 public static void SetCoopModeForAll(StageObject.COOP_MODE_TYPE coop_mode, int client_id)
 {
     if (MonoBehaviourSingleton <StageObjectManager> .IsValid())
     {
         int i = 0;
         for (int count = MonoBehaviourSingleton <StageObjectManager> .I.objectList.Count; i < count; i++)
         {
             StageObject stageObject = MonoBehaviourSingleton <StageObjectManager> .I.objectList[i];
             if (stageObject.coopMode != coop_mode)
             {
                 stageObject.SetCoopMode(coop_mode, client_id);
             }
         }
     }
 }
コード例 #3
0
    public static void SetOfflineForAll()
    {
        //IL_0041: Unknown result type (might be due to invalid IL or missing references)
        //IL_0046: Unknown result type (might be due to invalid IL or missing references)
        //IL_006b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0070: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f4: Unknown result type (might be due to invalid IL or missing references)
        if (MonoBehaviourSingleton <StageObjectManager> .IsValid())
        {
            MonoBehaviourSingleton <StageObjectManager> .I.cacheList.ForEach(delegate(StageObject obj)
            {
                //IL_0001: Unknown result type (might be due to invalid IL or missing references)
                obj.get_gameObject().SetActive(true);
            });

            MonoBehaviourSingleton <StageObjectManager> .I.ClearCacheObject();

            Vector3 val = Vector3.get_zero();
            if (MonoBehaviourSingleton <StageObjectManager> .I.boss != null)
            {
                val = MonoBehaviourSingleton <StageObjectManager> .I.boss._transform.get_position();
            }
            int i = 0;
            for (int count = MonoBehaviourSingleton <StageObjectManager> .I.objectList.Count; i < count; i++)
            {
                StageObject stageObject = MonoBehaviourSingleton <StageObjectManager> .I.objectList[i];
                if (!stageObject.IsCoopNone())
                {
                    stageObject.SetCoopMode(StageObject.COOP_MODE_TYPE.NONE, 0);
                }
                stageObject.isCoopInitialized = true;
                if (stageObject is Player)
                {
                    Player player = stageObject as Player;
                    SetAI(player);
                    if (!player.isSetAppearPos)
                    {
                        if (player is Self)
                        {
                            player.SetAppearPosOwner(val);
                        }
                        else
                        {
                            player.SetAppearPosGuest(val);
                        }
                    }
                    if (player.isWaitBattleStart)
                    {
                        player.ActBattleStart(false);
                    }
                }
                else if (stageObject is Enemy)
                {
                    Enemy enemy = stageObject as Enemy;
                    SetAI(enemy);
                    if (!enemy.isSetAppearPos)
                    {
                        enemy.SetAppearPosEnemy();
                    }
                }
            }
        }
    }